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 Access active query

Viewing 10 posts - 1 through 10 (of 13 total)
  • klox7
    #59243

    Hello,

    I would like to display some text on my first page of archive based on if user did not filter anything. Can you help me with this?

    Regards

    Trevor Moderator
    #59255

    So, if I understand you, you want to run a check to see if the query is filtered, and if it is NOT then display som content? Do you still want to show the posts or do you want the page to only show posts when the user has made a filter selection?

    klox7
    #59296

    Exactly, I wanto to check if query is filtered and then display something that doesn’t inovolve posts. It’s a custom code. I tried $searchandfilter->get(filter_id)->current_query() with is_filtered() but it always returns 1.

    Trevor Moderator
    #59315

    Are you using the shortcode display method?

    klox7
    #59318

    Yes.

    Trevor Moderator
    #59325

    You used the is_filtered function in the results.php? And did you make a custom copy of the results.php template file (per our documentation)?

    klox7
    #59342

    Oh, sorry. I’m displaying filter with shortcode. For results I have custom template in custom post type.

    Trevor Moderator
    #59348

    Ah, but in the form, what is the Display Results method set to? if it is shortcode, then the plugin uses our results.php template.

    klox7
    #59350

    It is post type archive.

    Trevor Moderator
    #59443

    Is it possible to use the Shortcode method? That way you can play with the results.php template that we provide. Alternatively, you would need to edit the template file for that post type’s archive page in your theme to add the is_filtered condition.

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

The topic ‘Access active query’ is closed to new replies.