Forums Forums Search & Filter Pro Exclude term by login status?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #261514

    Hello, just wondering if there’s a filter that would allow me to exclude a particular taxonomy term from searches by logged out users?

    FYI I tried to make a separate form for logged in and logged out users. However, this form goes on the WooCommerce shop page. So I got an error message saying that’s not allowed.

    Any help is appreciated!

    Trevor
    #261568

    You could remove the term from the field in the form using this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#filter-input-object

    You would check to make sure of the form ID, and the user’s logged in status, then remove the term if needed.

    Anonymous
    #261652

    Thanks Trevor! However, I’m not concerned about the fields. Instead, I want to remove any post that has the term from the results. Kind of like a pre_get_posts filter? Any ideas?

    Trevor
    #261658

    You may need to add that in the query then, using this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments

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