Urgent – Custom Search Pages

Forums › Forums › Search & Filter Pro › Urgent – Custom Search Pages

Tagged: 

Viewing 6 posts – 1 through 6 (of 6 total)
  • Anonymous
    #236719

    Hi,

    On my website, I have 4 post categories (Cat1, Cat2, Cat3, Cat4).
    I also have 4 custom fields for each category (F1, F2, F3, F4).
    And 1 Tag (T1) which is common for all post categories.

    My problem is I want to create 4 search pages (1 for each category, showing 2 dropdowns, one for the field (F1, F2…) and one for the tag (T1) as follows:

    Category Cat1 page:
    F1 – (dropdown)
    Tag – (dropdown)
    <Search>

    I want Tag dropdown to adjust according to the value selected in F1.
    Also, the user should not have to select the category, the search form page should be automatically dedicated to it.
    Can you please help how to set up these pages?

    Trevor
    #236735

    If these are what are known as category term archive pages, such as:

    mywesbite.com/category/cat1/ or mywesbite.com/cat1/ (depending on how your permalinks are setup)

    Then set the Display Results method to ‘Post Type Archive’, place the category field in the form, and then use custom CSS to hide it, maybe (where the ID number changes to match that of your form):

    .searchandfilter[data-sf-form-id="1428"] .sf-field-category {
      display: none;
    }

    And then, on the General Settings tab, enable Auto Count (both settings) and also Auto Detect for Tags, Categories and Taxonomies.

    Then, in the custom field and tag fields, set these to Hide Empty.

    This assumes that you theme uses fairly standard PHP archive templates.

    This method would mean you use one form that will change/adapt depending on the page it is on.

    Anonymous
    #236821

    Thanks, Trevor for your response.

    I was able to add custom field and tag dropdown based filtering yesterday. As you mentioned, I also enabled ‘hide empty’ on tags to remove empty tags from the drop-down list which looks great.

    What I am stuck now is on setting up the relation between custom field and tag values.

    For instance, say the user selects a value from custom field dropdown = “DECEMBER”. Then tags dropdown should only show relevant tags from posts having custom field value = DECEMBER.

    Can you please elaborate on how to achieve this? Thanks

    Trevor
    #236825

    That should happen if you have both Auto Count options enabled.

    Anonymous
    #237136

    It worked, Thank you for your help. 🙂

    Trevor
    #237138

    Thanks for letting me know. I will close this thread for now.

Viewing 6 posts – 1 through 6 (of 6 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.