Opened 20 years ago
Closed 20 years ago
#2822 closed defect (bug) (fixed)
show_on_front kills post_type=post queries on home page
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.1 | Priority: | normal |
| Severity: | normal | Version: | 2.1 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
This came up when people tried using the Recent Posts widget on their blogs when show_on_front is set to 'page'. If it's safe to assume special queries like that will provide query args, the attached patch fixes it. For example, this code is broken before and fixed after the patch:
<?php $r = new WP_Query('showposts=10'); ?>
<?php if ( $r->have_posts() ) : while ( $r->have_posts() ) : $r->the_post(); ?>
/* Loop stuff */
<?php endwhile; endif; ?>
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [3869]) Query fix from skeltoac. fixes #2822