0

I am trying to create promotional pages for our magento site to run marketing campaigns from. It is very important for us to be able to share these pages on social, which means editing the open-graphs for each page so the correct image appears etc.

Is there any way for me to access the header HTML for individual pages so I can input my own meta-tags?

So far I can only add text for title and description in the back end, but images for individual pages (other than product pages) aren't proving to easy, unless I'm missing something?

2
  • Which magento version are you using? and you want to set meta tag for product page or cms page? Aug 22, 2016 at 10:25
  • Version 1.7.0.2, I want to set meta tags for a category page. I have created a category called promotions for which I will add a sub-category for each marketing campaign.
    – Freddie.B
    Aug 23, 2016 at 11:35

1 Answer 1

0

You can add Meta tag for category page from admin panel Just Follow image to add meta Keywords and Description enter image description here

Or Go to app/design/frontend/yourpackage/yourtheme/template/page/html/head.phtml

and put below code

<?php if(Mage::registry('current_category')):?>
<meta property="og:image" ><!--Your meta tag for category-->

<?php endif; ?>
3
  • Thanks @murtuza, but how do I change the <meta property="og:image" - ?? Currently the image that facebook etc pulls through is just our logo and it's also the wrong size, I have an image in mind but don't know where to put it...
    – Freddie.B
    Aug 23, 2016 at 12:35
  • please check my updated answer Aug 23, 2016 at 13:39
  • Have you do the changes or need some help for this Yet? Aug 25, 2016 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.