‘relevanssi_post_ok’ $post_ID returns NULL
-
I’m attempting to use the ‘relevanssi_post_ok’ filter. According to the documentation, there should be two arguments available: $post_ok and $post_ID. $post_ID is returning NULL for me. How do I get information about the current post being filtered so I can exclude it from the search results if I need to?
add_filter('relevanssi_post_ok', 'filter_search_results'); function filter_search_results($post_ok, $post_ID) { var_dump($post_ID); // returns NULL return $post_ok; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘‘relevanssi_post_ok’ $post_ID returns NULL’ is closed to new replies.