1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SEO for search type pages

Discussion in 'PHP & Perl' started by revekozu, Feb 18, 2012.

  1. revekozu

    revekozu Junior Member

    Joined:
    Jul 30, 2010
    Messages:
    133
    Likes Received:
    41
    I would like to create titles and descriptions for wordpress urls with search variables that end like this /?search=pizza or /?search=whatever+something

    maybe it could take it from the form input
    Code:
    <input type="text" name="search=" />
    

    Any plugins or other ideas come to mind that might do this?

    Seems like I should be able to hack an existing SEO plugin to get this done.
     
  2. juust

    juust Newbie

    Joined:
    Nov 29, 2010
    Messages:
    8
    Likes Received:
    25
    Occupation:
    sailor
    Location:
    im your dreams
    echo get_search_query();
     
  3. revekozu

    revekozu Junior Member

    Joined:
    Jul 30, 2010
    Messages:
    133
    Likes Received:
    41
    that got me on the right trail.

    I'm using

    PHP:
    echo $_GET["mysearch"];
    to pull the string from a url like mysite .com/category/page?mysearch=anchovies

    No problem inserting that in spots in the templates and works fine.

    Been stumped on how to take over the meta data though. I just want this on specific pages, so I disabled the SEO plugin and use a different theme for those pages.

    Putting the code in title tags the themes header gets me nowhere. wordpress just keep putting up the standard <title>

    tried getting rid of the wp_head part... i even tried removing get header from the page template. The existing header won't die. :)