Forums Forums Search & Filter Pro “Exclude Post IDs” function not working

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #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
    #259012
    This reply has been marked as private.
    Anonymous
    #263785
    This reply has been marked as private.
    Trevor
    #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?

    Anonymous
    #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
    #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

    Anonymous
    #263881

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

    Trevor
    #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

    Anonymous
    #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
    #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)