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 Default result

Viewing 10 posts - 1 through 10 (of 19 total)
  • François Nantel
    #68644

    Hi! I create a ACF checkbox called “archived”.

    I need my default search result not showing any post that is checked “archived”.

    Into my search, the checkbox “archived” is not check.

    François Nantel
    #68645
    This reply has been marked as private.
    Trevor Moderator
    #68661

    The search works, yes? But, by default, you only want archived posts?

    François Nantel
    #68665

    Yes the search works fine 🙂
    But by default I don’t want to see meta post “archived” checked post.

    Thanks

    Trevor Moderator
    #68667

    But you might want to allow it by the user? Does it need to be checked or not checked to do as you wish?

    François Nantel
    #68669

    Yes I want to allow the user to see “archived” when they check it
    But by default not showing that kind of post

    Thanks

    Trevor Moderator
    #68671

    It IS possible, but I have never done it. You would need to use the is_filtered() function to see if the filter has yet been used (or has been reset) and then use sf_edit_query_args filter to change the incoming filters applied to the page. All this in your child theme functions.php file.

    You might find ideas in this github repository from the developer of Search & Filter:

    https://github.com/rmorse

    François Nantel
    #68677

    Good!
    Thanks for your answer, I’ll try it!

    Trevor Moderator
    #68684

    Or, if you were willing to do so, you could append to the menu link for the page the query string that makes it so.

    François Nantel
    #68698
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 19 total)

The topic ‘Default result’ is closed to new replies.