Created
February 7, 2024 08:11
-
-
Save sachyya/fdaac66144cfdd53c5e7dfe22074626c to your computer and use it in GitHub Desktop.
Hide post with Thank you term
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_slug_skip_post( $skip, $post ) { | |
if( $post->post_type == 'resource' ) { | |
if (has_term('Thank You', 'resource-category', $post ) || has_term('Thank You', 'resource-tag', $post ) ) { | |
$skip = true; | |
} | |
} | |
return $skip; | |
} | |
add_filter( 'cm_typesense_bulk_import_skip_post', 'custom_slug_skip_post', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment