get_posts issue
-
I’m using the code below on the homepage here (http:/www.willowbilliards.com) to display an event from the Featured Event Category (cat. 5). But for some reason, rather then display the title of the post, there’s a link for HOME. How do I get the title of the post to appear instead???
<h2>Recent Featured Event</h2> <?php $latestposts = get_posts('numberposts=1&category=5'); foreach($latestposts as $post) : setup_postdata($post); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <?php endforeach; ?>
please advise. thanks in advance!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘get_posts issue’ is closed to new replies.