Support » Fixing WordPress » Some Custom Fields Data Not Showing Up

  • Joel Goodman


    The site: (sidebar on left, “behind the scenes”)

    So I’ve set up, basically, and asides feed in the left sidebar. Pretty standard, uses the_excerpt from a specific category (that cat is hidden in the main loop). And I’ve attempted to include a thumbnail from each post with the_excerpt. Code:

    <?php $postlist = get_posts('category=105&numberposts=1');
    				foreach ($postlist as $post) :?>
                    $thumb = get_post_meta($post->ID, "thumb", true);
                    if ($thumb != "")
                    { ?>
                    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
                    <img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="<?php the_title(); ?>" class="thumb" />
                    <?php the_excerpt(); ?>
                    <?php } else { ?>
                    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
                    <?php the_excerpt(); ?>
                    <?php } ?>
    				<?php endforeach; ?>

    The thumbnail doesn’t show up. When you view source on the page you’ll see that the src path doesn’t generate for the thumb.

    Any ideas? I copied then modified that snippet from here:

    Any suggestions are greatly appreciated.

Viewing 1 replies (of 1 total)
  • schmaart


    Can we assume you’re using the full URL for the thumb Custom Field Value?

Viewing 1 replies (of 1 total)
  • The topic ‘Some Custom Fields Data Not Showing Up’ is closed to new replies.