how to set og:image property only for specific (home) page?

Posted in: Newspaper
Post count: 3

Hello

how to set og:image property only for specific (home) page?

preferably code snippet for functions.php, but how could I protect it from being rewritten on theme updates?

Post count: 35449

Hello,

Can you provide some more details about this request? Unfortunately, I’m afraid that I do not understand your request.

Thank you!

Post count: 3

Hi, here are the details:

– our blog incorrectly sets the “<meta name=’og:image’
vlaue=’uri_to_image’>” for the home page
– we want to force the value of the meta header “<meta name=’og:image’
value=’uri_to_custom_1image’>” only on the home page
– we don’t want to install a plugin for this
– we want to set the meta header with the functions.php (add_action)
– i don’t want theme updates (Newletter) to overwrite our custom functions . should i create a child theme from Newsletter just to add that function?

Post count: 35449

Hi,
I understand. The theme itself does not have options for og:image and these are usually added by plugins, but if you do not want to use a plugin and want to manually add the code this can be set directly in the theme settings, in theme panel> analytics / js code in the header section – https://i.imgur.com/SmH3JZX.png
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.