How do I turn search querry result into a Page? (4 posts)

  1. billdennis4
    Posted 10 years ago #

    Yes, I did search for this before asking. I'm usng WP 1.5.


    Thanks in advance.

  2. Kafkaesqui

    Posted 10 years ago #

    Copy & paste?

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

  3. billdennis4
    Posted 10 years ago #

    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.

  4. Kafkaesqui

    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic