Support » Fixing WordPress » How do I turn search querry result into a Page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Copy & paste?

    Seriously, I’m not even sure it’s possible. Why do you want to do this?

    I would like visitors who come to my site seeking posts about a few specific subjects to see a link that takes them to a page that shows a list of those articles. This saves them from having to run a search themselves, or tips them off that I have a lot of articles about this particular subject. Of course, I could just run a search querry, copy the url, and then hand code it into the sidebat. But I woduld much rather create a Page so it will show up int he sidebar even if I switch templates even if I start using a theme switcher.

    Hmm. Interesting idea.

    And yes, what you’re looking to do *can* be done by creating and assigning a custom Page template which uses query_posts() to initialize a post loop for each of your “topics.”

    Note that the Codex article on query_posts() does not mention it, but it can accept a search argument:

    <?php query_posts('s=query'); ?>

    EDIT: Probably should note that if your concern is with theme switching, then make sure the Page template is part of each theme used on your site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I turn search querry result into a Page?’ is closed to new replies.