Support » Fixing WordPress » Custom Field Isn't Displaying

  • Resolved mattblank



    In my footer I use this code:

    $posts = get_posts('cat=5&numberposts=3');
    foreach ($posts as $post) : start_wp(); ?>
    <li><a href="<?php the_permalink(); ?>">
    <?php the_post_thumbnail('thumbnail'); ?>
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'Short Teaser', true);

    Notice after the thumbnail, I’m pulling in a custom field called Short Teaser. This works on every page (though I’ve had previous issues). But on one of my category pages changing:

    <?php if ( have_posts() ) : ?>


    <?php if ( have_posts() ) : query_posts($query_string."&posts_per_page=2&paged=$paged"); ?>

    By doing this, it means on this page it prevents the custom field from showing (thumbnail still displays). Anyone know how I can avoid this? I presume I can pull in the custom field in some other way to stop avoid the clashes I keep getting at every corner.


Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Field Isn't Displaying’ is closed to new replies.