WordPress.org

Ready to get started?Download WordPress

Forums

Info on search string in URL (2 posts)

  1. powermaniac
    Member
    Posted 1 year ago #

    I have a bit of a problem with search and WPML working together in a custom theme. Everything seems to output properly if I bypass the theme and put something like:

    mysite.com/?s=mysearchterm

    I know I can also feed category id's into that by doing something like ?s=mysearchterm&cat=52

    My search has 4 fields Keywords, Category, State, and City (custom taxonomies for the last 2, I believe). They can search for the term "seo" and limit the results by City or State for example.

    I can put the "?s=mysearchterm&cat=52" string, but it will search for things that have the words "mysearchterm" in any category, not just category=52...

    Any ideas, or information on how I can manipulate search through the URL?

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Seems to work by default on my site, if using permalinks...

    Try the cat title (not id) (or call the id string?)

    Examples:

    http://seacoastwebservice.com/?s=Impresses&cat=blog

    http://seacoastwebservice.com/?s=iPhone&cat=Tech

Topic Closed

This topic has been closed to new replies.

About this Topic