Forums

Localizing/targeting a search in a specific area (1 post)

  1. mwaterous
    Member
    Posted 2 years ago #

    Hi, I tried asking this over on the ยต forums with no luck, so I thought maybe I would ask over here before moving on to wp-hackers for some insight.

    I've been scouring google to try and find out if this is possible, along with the codebase, but I'm coming up at dead ends.

    I know it's possible to restrict your WP search to specific categories. Nice feature, but I was wondering if you could go one further and restrict it to a specific page, and preferably its children.

    Update: Seems running page_id, p or pagename in the query string all either return a 404, or redirect you to the page itself. So I'm wondering if you can hook the_posts and just modify WP_Query there...

    Update: ahh I was hoping it'd be as simple as modifying page_id in the query vars to the appropriate ID, but no go there either.

Topic Closed

This topic has been closed to new replies.

About this Topic