Recent Posts on Home Page
-
I am using the following code that installs with WordPress on the home page to display the latest post. This works exactly as described including a Plugin called User Photo that shows a thumbnail of the author. My issue is that I I want to somehow tweak the have_posts aspect of the code to pull from a single category instead of posting anything newly added.
I have tried numerous plug-ins to pull posts from a single category put they all interfere with the User Photo plug-in.
Can someone please show me how or point me in the right direction to use the existing code but restrict it to a single category?
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <h2 style="color:#C15500;">Tips</h2> <div class="info"><?php the_author_link() ?></div> <div class="text_top293"><?php userphoto_the_author_thumbnail() ?> <div style="padding-left:6px;"><h2><?php the_title(); ?>-</h2> <?php the_excerpt(); ?></div> <div align="right"> <img hspace="3" vspace="3" src="/wp-content/plugins/events-calendar/images/list.gif" border="0" align="absmiddle" /> <a href="<?php the_permalink(); ?>">full article</a><br /> <img hspace="3" vspace="3" src="/wp-content/plugins/events-calendar/images/list.gif" border="0" align="absmiddle" /> <a href="<?php comments_link(); ?>">read users' comments</a> (<?php comments_number('0', '1', '%', 'number'); ?>) </div> <?php endwhile; ?> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Recent Posts on Home Page’ is closed to new replies.