Looking for the same aswer. Couldn’t find anything throught the documentation nor the forums.
Tried with
<?php $wp_query->set(‘post_type’, ‘post’); ?>
Before have_posts(), tried it on header.php, but didn’t work either.
(thanks to maymaym)
Maybe there is something wrong (or to-do) on the code.
Maybe some crew can check for it for future versions.
ftr, im trying it on a wpmu 2.6 installation.
I made it work by changing the file:
wp-includes/query.php
When it says: (line 836 on a wpmu 2.6)
$q[‘post_type’] = ‘any’;
It should say
$q[‘post_type’] = ‘post’;
Wondering if there is a way to do this by not editing this file. I mean by using a wp hack in the header, or in the search template. if anyone knows the proper way to do it, please tell me here.
I am looking for the same feature, and also found nothing. Please any info would be helpful. (even a hard-coding hack if no other way possible) Thanks!