I want to show some copy and then the title, excerpt and tags of any posts in a category called portfolio for a specific page.
Here is my first loop to show the content for the page
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="entry">
<?php the_content('<p>Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; ?>
And then here is my loop for the posts.
<?php $my_query = new WP_Query('category_name=whatever&showposts=3');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="date">
<?php the_time('D j \<\d\i\v \c\l\a\s\s\=\"\m\o\n\t\h\">M<\/\d\i\v\> Y')?>
</div>
<div class="thumb"><img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="<?php the_title(); ?>" class="thumb" /></div>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a></h3>
<div class="entry">
<?php the_excerpt(); ?>
</div>
<div class="tags">
<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>
</div>
</div>
<?php endwhile; ?>
For some reason it won't show the tags. What am I doing wrong? I thought it might have to do with the fact that I have two loops but when I take the first one out it doesn't resolve the problem. Please let me know what you think and thanks in advance.