[Skip to main content](#vessel-content)

#   How to edit Open Graph Title and Description

##

- **[Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")**
- [![Sandra74's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/60896-sandra74 "View Sandra74's Profile") Topic Author
- [ Offline](/forum/user/60896-sandra74)

Less More

- Posts: 197
- Thank you received: 18
-
-

3 years 8 months ago [\#349366](#349366) by [Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")  *[How to edit Open Graph Title and Description](/forum/26-product-category-display/905920-how-to-edit-open-graph-title-and-description#349366 "-- url of the page with the problem -- :   rolex.jewelrygoldfinger.com/fr/collectio...-ii/m126710blnr-0003  -- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.1.14  Hi,  Currrently, the Open Graph Title is generated from the name of the product and the Open Graph Description from the description of the product.  I would like the Open Graph Title to be the 'Page Title' of the Product and the Open Graph Description to be the 'Meta Description' of the product.  I presume I need to edit these lines: 'name, ENT&#95;COMPAT,'UTF-8').'&quot;/&gt; '  and  $description = $this-&gt;&#95;cleanDescription($element-&gt;description); $this-&gt;meta = ' ';  But I have no clue what to do.  Would it be possible to help me?  Thanks in advance!  Sandra")* was created by *[Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")*

-- url of the page with the problem -- : [ rolex.jewelrygoldfinger.com/fr/collectio...-ii/m126710blnr-0003](https://rolex.jewelrygoldfinger.com/fr/collection/gmt-master-ii/m126710blnr-0003)
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.1.14

Hi,

Currrently, the Open Graph Title is generated from the name of the product and the Open Graph Description from the description of the product.

I would like the Open Graph Title to be the 'Page Title' of the Product and the Open Graph Description to be the 'Meta Description' of the product.

I presume I need to edit these lines:
'&lt;meta property="og:title" content="'.htmlspecialchars($element-&gt;name, ENT_COMPAT,'UTF-8').'"/&gt; '

and

$description = $this-&gt;_cleanDescription($element-&gt;description);
$this-&gt;meta = '&lt;meta property="og:description" content="'.$description.'"/&gt; ';

But I have no clue what to do.

Would it be possible to help me?

Thanks in advance!

Sandra

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDU5MjAtaG93LXRvLWVkaXQtb3Blbi1ncmFwaC10aXRsZS1hbmQtZGVzY3JpcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

3 years 8 months ago [\#349369](#349369) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to edit Open Graph Title and Description](/forum/26-product-category-display/905920-how-to-edit-open-graph-title-and-description#349369 "-- url of the page with the problem -- :   rolex.jewelrygoldfinger.com/fr/collectio...-ii/m126710blnr-0003  -- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.1.14  Hi,  Currrently, the Open Graph Title is generated from the name of the product and the Open Graph Description from the description of the product.  I would like the Open Graph Title to be the 'Page Title' of the Product and the Open Graph Description to be the 'Meta Description' of the product.  I presume I need to edit these lines: 'name, ENT&#95;COMPAT,'UTF-8').'&quot;/&gt; '  and  $description = $this-&gt;&#95;cleanDescription($element-&gt;description); $this-&gt;meta = ' ';  But I have no clue what to do.  Would it be possible to help me?  Thanks in advance!  Sandra")*

Hi,

You would have the change the lines: Code:

$ret-&gt;name = $element-&gt;product_name; $ret-&gt;description = $element-&gt;product_description;

to: Code:

$ret-&gt;name = $element-&gt;product_page_title; $ret-&gt;description = $element-&gt;product_meta_description;

in the file plugins/system/hikashopsocial/hikashopsocial.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDU5MjAtaG93LXRvLWVkaXQtb3Blbi1ncmFwaC10aXRsZS1hbmQtZGVzY3JpcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")**
- [![Sandra74's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/60896-sandra74 "View Sandra74's Profile") Topic Author
- [ Offline](/forum/user/60896-sandra74)

Less More

- Posts: 197
- Thank you received: 18
-
-

3 years 8 months ago [\#349373](#349373) by [Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")  Replied by *[Sandra74](/forum/user/60896-sandra74 "View Sandra74's Profile")* on topic *[How to edit Open Graph Title and Description](/forum/26-product-category-display/905920-how-to-edit-open-graph-title-and-description#349373 "-- url of the page with the problem -- :   rolex.jewelrygoldfinger.com/fr/collectio...-ii/m126710blnr-0003  -- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.1.14  Hi,  Currrently, the Open Graph Title is generated from the name of the product and the Open Graph Description from the description of the product.  I would like the Open Graph Title to be the 'Page Title' of the Product and the Open Graph Description to be the 'Meta Description' of the product.  I presume I need to edit these lines: 'name, ENT&#95;COMPAT,'UTF-8').'&quot;/&gt; '  and  $description = $this-&gt;&#95;cleanDescription($element-&gt;description); $this-&gt;meta = ' ';  But I have no clue what to do.  Would it be possible to help me?  Thanks in advance!  Sandra")*

Thnaks a lot for your help Nicolas.

Wish you a great weekend.

Sandra

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDU5MjAtaG93LXRvLWVkaXQtb3Blbi1ncmFwaC10aXRsZS1hbmQtZGVzY3JpcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
