I currently have a site that uses the "custom fields" feature to set the value of the
meta property="og:image" for each post. All of my og:images are stored on an external server.
I'm looking for a way to automatically set the "featured image" value with the value of the custom field for og:image.
My template does not display the "featured" image on each post, but it does display the featured image on the home page and on the category pages.
Code used to set og:image value
<meta property="og:image" content="<?php $post_id = get_the_ID(); echo get_post_meta($post_id, 'og_image', 'true'); ?>" />
Any ideas or suggestions?
I'm not a coding expert. I know enough to 'tweak' things and not break thing, but I'm no developer.