Resolved Custom Search. Refine search by category and sub​​-category

5 posts in this topic

Hello everybody,

I'm building a new site with Pagelines and would request special assistance.

Well, I want to offer a customized search engine on my new site, as this will be an advertising site, where I have registered several companies from various sectors. So, I want to allow users have a filter the search by category.


I will create several categories that will be the States of my Country and sub​​-categories that are the Cities of each state. So, I want that the user can choose which place he wants to search.

Well, I searched few plugins they can offer this, but not found.

In this case, only the search form, more two 'Select'. Being one for category and another for sub-category that appears when the user selects a category.

Well, here's an example of what I want:


If someone can give me a hint how I can do this, I'll be very happy and grateful. Or, if you know a plugin that has this functionality, even better! :D

The search system WordPress is very simple! Well they could offer something more sophisticated! :mellow:

Thank you!

Share this post

Link to post
Share on other sites

Hi Danny, Thanks for the tip, I'll test this plugin. :)

But what I really wanted was a hint of how to implement the "Select" for categories alongside the search form of theme to filter the search by category.

I tried something like the example below, it works, but it brings all categories, I wanted to implement with other select for sub-categories according to the previously selected category.


<form role="search" method="get" id="searchform" action="<?php bloginfo('siteurl'); ?>">


    <label class="screen-reader-text" for="s">Search: </label>

	 <input type="text" value="" name="s" id="s" />

   <?php wp_dropdown_categories( 'show_option_all = Filter by: ' );?>	 <input type="submit" id="searchsubmit" value="Submit" />



I believe it is something complicated, you may need PHP code, so come help.

Anyway, I appreciate your help!

Share this post

Link to post
Share on other sites

We can close this topic!

Share this post

Link to post
Share on other sites

The topic was marked as resolved.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • Search facility in Multimenu
      By MissT+
      Hi there,
      Just wondering if there is a reason why there is no search option within Multimenu as there is with Navi - would be good if it did have it and it worked in a similar way and you could switch it off when you need to.
      Many thanks.
    • Custom design for different category pages
      By mzhafzah
      I am using DMS 2 theme and I want to create a 2 different links on my website; each link should take you to a different blog post category. Although the process is easy, yet I can not figure out how to give each category page a unique design of its own; Any change I make on any page is applied to the other (I'm aware of the universal elements like the header and footer and I a am not talking about these.)
      Since I am new to wordpress in general, I am not sure if my description is sufficient; apologies if it is not.
    • Modify postloop by category
      By morrisjohnc
      My blog has two separate types of post content, both of which need to be created as posts, not pages, in WP.
      On the category pages, Bespoke pulls the featured image and the 10 word excerpt (or whatever is provided for in the excerpts post field).  How can I get certain categories to show the full content of a post and others this standard format with the "read more" button?
      Question 2 - Is it possible to have different templates for different category listing pages?  Example, use the postloop for one category and the masonic gallery for another?
      Thank you in advance for your help!
    • Default Category/Post Thumbnail
      By aldisney+
      I was wondering if there was a relatively easy to way automatically assign a thumbnail to a post category when displaying posts in the Masonic Gallery format, when the post doesn't have a featured image? I've got a client with a ton of posts that just won't have any featured images, but each category has a header image. I'd like to display the header image as the thumbnail for all these posts, since, going forward, my client does actually plan to use featured images.
    • How to Check/Repair Site Search Field
      By bartoncollege
      I have a site using Platform Pro 1.5.3 on WP 4.1.  After restoring the site following a hack and after upgrading to WP 4.1 and adding the Sucuri security plugin, I learned that the site search feature was no longer working.  After typing a search term and hitting Return, a completely blank page appears with the URL as "http://[sitename.tld]/?s=[search term]&submit.x=0&submit.y=0".  I'm not sure if it's an incompatibility with WP 4.1 or if it's the result of telling the Sucuri plugin to restore modified files.
      Would someone offer tips on what to check or repair?  Thanks.