Folder thumbnails conflict with page thumbnails?
-
For some reason, on my setup the folder thumbnail is getting output as my page’s thumbnail.
I created a page called “Gallery”, and inserted
[eazyest_gallery]
into it. I then go in the WP backend, and assign a distinct post thumbnail/featured image to the Gallery page. I created a gallery also, and checked to see if that gallery’s thumbnail shows on the Gallery page and it does. But instead of my distinct page thumbnail/featured image showing where the post thumbnail should be, instead, it shows a blown up version of that one folder’s thumbnail.This is the code that I am using to output the featured image:
<?php // Must be inside a loop. global $post; if ( has_post_thumbnail($post->ID) ) { $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full'); } else { $src =''; // I will write a fallback here } ?> <header id="masthead" class="site-header cf" role="banner" style="background-image: url(<?php echo $src[0]; ?> ); background-repeat: no-repeat; background-size: cover; background-position: center center">
Anyone have any ideas why this is happening and how I can prevent it and show the page’s actual featured image?
- The topic ‘Folder thumbnails conflict with page thumbnails?’ is closed to new replies.