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 “Exclude Post IDs” function not working

Viewing 10 posts - 1 through 10 (of 12 total)
  • Brian Sirkia
    #258971

    The first result when searching “thank you” (https://sffilm.org/search/?_sf_s=thank+you) is https://sffilm.org/cfe-thank-you/, which is Post ID 9446 and is in the “Exclude Post IDs” array. After adding I’ve rebuilt the search and filter cache, cleared the site cache and cookies, but it keeps showing up in the results.

    Trevor Moderator
    #259012
    This reply has been marked as private.
    Brian Sirkia
    #263785
    This reply has been marked as private.
    Trevor Moderator
    #263859

    I see four search forms, but all the forms are set to Shortcode method, and on the results page I do not see our search form, nor our search form results shortcode?

    Brian Sirkia
    #263876

    Hey Trevor, yeah sorry realizing we’ve customized this quite a bit. One thing I think would help, is it possible to access the “Exclude Post IDs” from the global $searchandfilter var?

    Trevor Moderator
    #263879

    You may need to use the post__not_in argument in our query (same method as used for for wp_query) and use this in a function inside your child theme’s functions.php file.

    You would use this filter:

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

    Brian Sirkia
    #263881

    right I’m wondering if I can get the value of the “exclude post ids” field to be used within that filter?

    Trevor Moderator
    #263885

    You should be able to. I am just wondering, how many posts is this searching, as I see you are using WP Engine as your hots, see here:

    https://support.searchandfilter.com/forums/topic/search-results-seem-to-return-all-posts/#post-259939

    Brian Sirkia
    #263887

    right I realized we were modifying the “post__not_in” query var already for another issue, so just need to be able to append the “exclude post ids” field there. How would I access that sorry?

    Trevor Moderator
    #263889

    If yu are using that elsewhere, it is possibly overwriting our query, hence it wasn’t working. Did you try appending those exclude IDs to your existing use?

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.