Opengraph Tags For Homepage Only

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeOpengraph Tags For Homepage Only

This topic has been marked as resolved.

Hi there,

I want to add…

<meta property=”og:image” content=”http://ia.media-imdb.com/images/rock.jpg&#8221; />

..to just my homepage (since all the other pages, Facebook seems to be grabbing the correct image when I share it) using the Pav theme.

Obviously I will replace the image with the one that I need. I presume that I will need to edit the home.tpl (not the footer or header, since that will affect every page) but I am having difficulties.

Please help!

  • This reply was modified 2661 days ago by  Cdcstudios.
  • This reply was modified 2661 days ago by  Cdcstudios.
January 9, 2017 at 8:58 am #55130
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
January 10, 2017 at 11:30 pm #55276

Thank you, I will give this a try in my header.php file.

January 11, 2017 at 10:48 am #55340

Hi there,

Just realized, I don’t have /common/home since I have an SEO module that just rewrites my site to example.com.

I am actually thinking of removing the OpenGraph code from the header. Then just adding one instance of the code (with the correct default image) to home.tpl and another instance of the code to the product.tpl file.

Would that work?

I just want a default facebook share image for the homepage, and the product image for the product page (second one works fine by default).

January 13, 2017 at 11:30 am #55414

Hi,

The above check should work even if SEO urls are used.

BR,
ThemeBurn team

January 13, 2017 at 12:49 pm #55417

Thank you :)

January 13, 2017 at 8:23 pm #55424

Glad we’ve helped :)

BR,
ThemeBurn team

January 17, 2017 at 6:02 pm #55533
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.