Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro How to show the currently selected title only

Viewing 2 posts - 21 through 22 (of 22 total)
  • Trevor Moderator
    #108630

    I suspect that ‘All Categories’ has no value attached to it, so you would have to test what you get from the code, and if it is empty then it would need to print ‘All Categories’ to the page title.

    Tom Thorley
    #108703

    GOT IT!!!

    global $searchandfilter;
    
     $sf_current_query = $searchandfilter->get(504)->current_query()->get_array();
    
     if (empty($sf_current_query)) {
        echo ('All Articles');
        }
     else {
       echo $sf_current_query['_sft_category']['active_terms'][0]['name'];
     }

    The above code worked like a charm, I also use the “Archive” setting as you suggested! Thanks so much for your help on this one!! Finally working properly!! 🙂

Viewing 2 posts - 21 through 22 (of 22 total)

The topic ‘How to show the currently selected title only’ is closed to new replies.