[wp-trac] [WordPress Trac] #18386: Bug in custom query when "Front page displays": "A static page"

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 12 10:34:17 UTC 2011


#18386: Bug in custom query when "Front page displays": "A static page"
--------------------------+-----------------------------
 Reporter:  CyberSpy      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  3.2.1
 Severity:  normal        |   Keywords:  dev-feedback
--------------------------+-----------------------------
 Here is the bug I have found:
 When Front page displays is set to: A static page
 and Blog posts are displayed on other page a bug accours...

 Lets prepare test enviroment, with clear wp installation and two posts,
 where one of them is set to default category, and other is set to newly
 created category (which defautly has ID = 3).
 Now, prepare two pages, and in Setting -> Reading set Front page to one of
 those pages, and Posts page to second one.

 If You would like to exclude posts from category no 3 from main blog
 index, normaly You would use:
 <?php query_posts($query_string . '&cat=-3'); ?> in index.php (or
 specified loop file linked there).
 This would work if blog index is set as home page, but fails to work when
 above test enviroment is used.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18386>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list