[wp-trac] [WordPress Trac] #8261: Exclude individual posts using
query_posts()
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 17 21:22:53 GMT 2008
#8261: Exclude individual posts using query_posts()
---------------------------+------------------------------------------------
Reporter: speculator152 | Owner: anonymous
Type: enhancement | Status: new
Priority: high | Milestone: 2.8
Component: Template | Version: 2.8
Severity: normal | Keywords: The Loop, query_posts()
---------------------------+------------------------------------------------
When using WordPress as a CMS the query_posts() template tag is very
useful to e.g. specify exactly which category to display posts from when
having a specific carousel promoting a specific category on the sidebar
(multiple loops on a single page - e.g. one in single.php and one in
sidebar.php).
However, it is highly needed to be able to exclude a particular post from
The Loop - e.g. when the single page is displaying a post with the title
"WordPress is great" and the post happens to be inside the Category called
"WordPress", which happens to be promoted on the sidebar with the title
"Read more in 'WordPress'". If "WordPress is great" is the latest post it
is both shown as the current post (single.php) as well as promoted again
on the sidebar - not so cool.
Hence, my feature request is to be able to exclude individual posts from
inside query_posts() - just as it is possible to exclude a specific
category as explained here:
http://codex.wordpress.org/Template_Tags/query_posts#Category_Parameters.
See e.g. http://online.wsj.com/article/SB122694399164234073.html where the
sidebar has a "More in Politics" section.
--
Ticket URL: <http://trac.wordpress.org/ticket/8261>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list