Support » Fixing WordPress » Custom fields IN widgets

  • 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!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom fields IN widgets’ is closed to new replies.