How to pass along string to a wordpress search ?

Discussion in 'WordPress' started by Nite, May 12, 2008.

  1. #1
    Hello.

    How would I go about passing along some string that I have to a wordpress search query?

    I would like the search result to return a link to the post rather than display the entire found post by itself.

    Thanks.
     
    Nite, May 12, 2008 IP
  2. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Edit your search.php. In the loop just leave something like this:

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    Code (markup):
     
    mizaks, May 12, 2008 IP