I’m trying to get a post thumbnail to show up in the meta for Facebook. For some reason wordpress is not acknowledging that a post thumb even exists on the single post page but works on the index.php/main loop just fine. I’ve used the code below on other WP sites, but it is not working here.
<meta property="og:image" content="<?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'large'); $image_url = $image_url; ?>"/>
I’ve also used the same the post thumb declaration as on the homepage to no avail. I was hoping someone had some insight as to why WordPress isn’t recognizing my post thumbs on a single post page.
- The topic ‘Post Thumbs not showing up on Single Post’ is closed to new replies.