Paul Buisson Posted November 18, 2021 Share Posted November 18, 2021 I found that this line was not present in head.tpl , but if I were to put it in, wouldn't that over-write the OG images on each other page? Where can I properly define the og:image for ONLY the root URL? <meta property=”og:image” content=”{$img_ps_dir}logo.jpg”> I tried setting a category cover image for the 'home' category, but that didn't work, and I do purposely have the display of the 'home' category set to off. Link to comment Share on other sites More sharing options...
Paul Buisson Posted November 18, 2021 Author Share Posted November 18, 2021 (edited) so the $img_ps_dir might predate 1.7.8 I instead tried <meta property="og:image" content="/img/metacardlogo.jpg" /> in the theme/classic/templates/_partials/head.tpl inserted after line 65. and that did in fact overwrite every other og:image throughout the site, as i suspected it would, so I assume that I would need to wrap the meta property in an {if !isset} to detect if ONLY it is the root URL, but I am at a loss of how to properly do that. Edited November 18, 2021 by Paul Buisson (see edit history) Link to comment Share on other sites More sharing options...
Mr Rick Posted November 24, 2021 Share Posted November 24, 2021 Hi, If you are using PS 1.7+ than use below condition to wrap it. {if $page.page_name == 'index'} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now