Display filters on search results page but not on the search bar in the menu

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Display filters on search results page but not on the search bar in the menu

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36970
    patricia.clemente
    patricia.clemente
    Participant

    Hi,

    I currently have a single search form that is displayed on the mega menu (attached ‘Search Bar – Menu’) and on a custom search results page (attached ‘Search Bar – Custom Results Page’).

    I was wondering if there is a way to configure the filter settings block such that it is displayed on the custom search results page but not on the mega menu – all by default – and without using more than 1 search form. I know that Ajax Pro provides a feature to show a ‘search settings switch’ which allows the user to open and close the filter block – however, we don’t want to implement this. Rather we would like the filter settings to be visible by default, but only on the custom results page.

    For context, the custom results page is created with Elementor, using the ‘Posts’ widget and the following documentation: https://documentation.ajaxsearchpro.com/elementor-integration/custom-results-page-with-elementor-pro.

    Thanks in advance!

    Attachments:
    You must be logged in to view attached files.
    #36987
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Sure!

    The best and probably the easiest way is to use the settings shortcode on the results page.

    That way, the settings are automatically displayed wherever this shortcode is placed.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #37049
    patricia.clemente
    patricia.clemente
    Participant

    Thanks Ernest!

    However, I’ve already been using the settings shortcode (i.e. [wpdreams_asp_settings id=1 element='div']) in my results page and I’ve set the search settings to visible by default – as seen in my previous attachment “Search Bar – Custom Results Page”. But because of this, the search bar displayed on my mega menu (see previous attachment “Search Bar – Menu”), also shows the filter block.

    I was wondering if there are any configurations that would allow me to keep showing the filter block on the results page i.e. in “Search Bar – Custom Results Page”, but not on the search bar in the mega menu so that it looks like “No Filter Block Search Bar” (please see new attachment).

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #37054
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    A custom CSS could work to forcefully hide the settings in the menu. It should be made specifically for the exact positioning and layout for your site, but this may also work:

    .asp_w_container .asp_ss {
        display: none !important;
    }

    That should hide any search setting boxes, which are positioned with the search bar. Out of position settings boxes should still be visible.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #37193
    patricia.clemente
    patricia.clemente
    Participant

    This worked great, thanks Ernest!

    #37201
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.