Last active
October 10, 2024 12:49
-
-
Save wp-seopress/b65b8f75792fffb38ae69eebcb1a4eab to your computer and use it in GitHub Desktop.
Filter post object sent automatically to IndexNow API
This file contains hidden or 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
add_filter('seopress_instant_indexing_permalink', 'sp_instant_indexing_permalink', 10, 2); | |
function sp_instant_indexing_permalink($permalink, $post) { | |
$cpt = get_post_type( $post ) ? get_post_type( $post ) : ''; | |
if ($cpt === 'test') { | |
return false; | |
} | |
return $permalink; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment