Archived

This topic is now archived and is closed to further replies.

  • 0

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


Question

Posted · Report post

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.

Example:

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:

filtrando-a-busca-por-estado-e-cidade.png

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

4 answers to this question

Posted · Report post

We can close this topic!

Share this post


Link to post
Share on other sites

Posted · Report post

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.

EX:


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

  <div>

    <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" />


  </div>

</form>

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

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites