Support Forums

Support Forums Forums Search & Filter Pro Current menu item

This topic is: not resolved

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

Viewing 10 posts - 1 through 10 (of 18 total)
  • Johannes Franke

    I have a problem with my menu.
    When I am on a page, it is highlighted in the menu via css for “current menu item”
    When all the parameters are added to the url, it seems to fail to detect that it still is on the page that should be highlighted in the menu.
    How do I solve that?

    Best regards,

    Trevor Moderator

    Can you give me an example of a page correct, and that same page with query strings, as two URLs?

    Johannes Franke

    Oh, wow. I found my mistake. It works. It just didn’t work because my menu item is directed to a url that already has a parameter defined. That leads me to another question:

    I need the results to be empty when I enter the page. Thats why I directed the menu item to a nonexisting category, like this:

    Is there any way to have an empty results page, when you first enter it?

    right now it shows all results:

    i dont want that.

    best regards! Johannes

    Trevor Moderator

    Yes, that is totally possible. You need to edit the results.php template file you are using, like this:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(36613)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // your current results.php code here
    Johannes Franke

    sounds great, but I don’t know where to put it. i use “post grid” – but i can’t find the php i have to put this in. :/

    Johannes Franke
    Johannes Franke

    😀 i solved that last one by simply editing the menu once again. url is the sae, but wordpress is suddenly satisfied.
    sorry for the back and forth.

    Trevor Moderator

    Is this all resolved now?

    Johannes Franke

    I still dont know where to put the code you gave me.
    i use “post grid” – but i can’t find the php i have to put this in. :/

    Trevor Moderator

    The form on this page:

    I using our Shortcode display method (as set on the Display Results settings tab in the form design. It is not set up for Post Grid?

Viewing 10 posts - 1 through 10 (of 18 total)

You must be logged in to reply to this topic.