Hello,
I’m trying to get custom fields (specifically images) to show up in Widgets, but they’re not having it. They’ll show fine if I put them straight in the sidebar.php, but not when pasted into a Widget. Do Widgets strip custom fields that are images?
Here’s my code:
<?php if (get_post_meta($post->ID, 'thumbnail', true)) { ?>
<a href="<?php the_permalink(); ?>"><img class="alignnone size-thumbnail" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" src="<?php echo get_post_meta($post->ID, 'thumbnail', true); ?>"/></a>
<?php } else { ?><?php } ?>
thanks in advance!