[SOLVED] Removing a Post from the Recent Posts Category
Hello,
Does anyone know if there is a way to remove a post from the recent post category, without deleting it? (I have a post that's really a news item but it's showing up in the recent post category.) www.womenscycling.ca/blog Thanks in advance for your help. Chloe |
You will either have to alter the posts date or edit the post to skip the specific post.
|
Hi,
Because it's a "news" post I don't want to change the time stamp. Can you tell me what you mean by "edit the post to skip the specific post"? Thanks for your help, Chloe |
I found the answer in an older posting by Flynn
Get PHP widget and put this code in: <ul> <?php $recentPosts = new WP_Query(); $recentPosts->query('showposts=5&cat=-XX,-YY,-ZZ'); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> "showposts" is the number of posts you want to show and -XX,-YY,-ZZ are the categories you want excluded. Thanks Flynn |
All times are GMT -6. The time now is 09:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.