post-thumbnail not displaying when logged in
-
Any ideas how to fix this issue:
On each post I use the below code to display the post thumbnail in my theme. Issue is, when you are logged into wordpress the image disappears. Log out and there is is again! Any thoughts?
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php // If WordPress 2.9 or above and a Post Thumbnail has been specified if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { the_post_thumbnail('single-post-thumbnail', array('class' => 'post-thumbnail', 'alt' => ''.get_the_title().'')); } // Or if a custom field post image has been specified else if (get_post_meta($post->ID, 'post_image_value', true)) { $postimage = get_post_meta($post->ID, 'post_image_value', true); echo '<img src="'.$postimage.'" alt="'.get_the_title().'" class="post-thumbnail" />'; } ?>
- The topic ‘post-thumbnail not displaying when logged in’ is closed to new replies.