Some Custom Fields Data Not Showing Up
-
The site: https://www.agapefest.com (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) :?> <?php $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" /> </a> <?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: https://www.widecastmarketing.com/thumbnail-for-your-wordpress-2.5-posts.html
Any suggestions are greatly appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Some Custom Fields Data Not Showing Up’ is closed to new replies.