Facebook Meta Tag og:image PHP condition -
i used php code og:image meta tag doesn't work, it's right doesn't call right source of image.
<?php jfactory::getdocument(); $document->addcustomtag('<meta property="og:image" content="http://www.sell4masari.com/images/com_adsmanager/ads/<?php.$img->image?>" />');?>
so appreciate anyone.
you're putting <?php
tags inside quotes, not being processed:
content="[...]/ads/<?php.$img->image?>" />');
you need build string through concatenation, so:
<?php jfactory::getdocument(); $document->addcustomtag('<meta property="og:image" content="http://www.sell4masari.com/images/com_adsmanager/ads/' . $img->image . '" />');?>
Comments
Post a Comment