Hello, how could I add a search input that would only search the listing category names?

To give an example, my directory is for local services; someone would search for ‘plumber’ and I’d like the results to show every listing in the ‘plumbers’ category, preferably sorted by rating. Can you help? Thank you.

  • Arnold
    • El Macho WP

    If you have created a “Plumber” listing category and the listing is marked with it you can use

    http://yoursite.com/listings-category/plumber/

    To get all the plumber category listings. They will sorted in reverse date order newest first.

    To change the sort order would require a custom query.

  • Matt
    • Design Lord, Child of Thor

    Thanks for the quick response, seems like a logical feature for a directory site, hopefully it won’t take too long to get to the top of the feature request pile.

    For the time being I’ll look into some advanced search plugins, if I can include category names, and exclude pages and posts it might just work. ‘Search everything’ looks promising. Not as nice as it could be, but should get me by.

    Thanks again.

  • Matt
    • Design Lord, Child of Thor

    @Arnold

    Yes, I’m aware I can list all listings from a particular category with that URL structure.

    Your response has got me thinking about another way to approach this though. I can already display a list of valid listing categories, so maybe I can work some javascript magic that suggests categories as the user types, similar to a live search, but effectively just a filter. Then simply send them to the URL of the category they’ve selected. Interesting.

    Thanks.