• Resolved Dave P.

    (@callmedpit)


    I tried searching but found no definitive way to do this, but is it possible to limit blog searches to only posts? I do not want any pages included in the results that come up.

Viewing 4 replies - 16 through 19 (of 19 total)
  • this works great, but now my search results pages are formatted as if the skipped pages are still there. For example I see a blank page and navigation to more results because the 5 items that should go on the first page were all pages, and thus filtered out.

    Can anyone point me to a way to better filter the formatting of the pages?

    Thanks

    Bumping this because I also have the problem mikeque described. With this quick fix it messes up the whole search and pagination. Anyone got any ideas? Thanks in advance.

    jidm,

    Brilliant. In query.php, I deleted the “any” and it resolved my issue. Not only were the pages showing up in results but the display was broken. All seems well now, although the site is brand new with little content yet, so I will hold my breath a while. Meanwhile, it looks good. Using WP 2.8.4 and Arras Theme 1.3.5. Just found this too – might be worth a look: https://www.ads-software.com/extend/plugins/search/

    Thanks!

    Thank you renato_s. The $post->post_type==’page’ bit was just what I was looking for to prevent my theme from displaying “Filed under:” and the default category on PAGE results shown in by search.php. I’m using the Search Everything plugin to include Pages in search results, but there’s no concept of categories for pages. Your conditional takes care of this perfectly.

    Thank You.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Possible? Search only posts, exclude pages’ is closed to new replies.