Skip to content

Instantly share code, notes, and snippets.

@MarkPraschan
Created July 9, 2019 18:09
Show Gist options
  • Save MarkPraschan/79036ed5909495a51f2052c4b8a1e787 to your computer and use it in GitHub Desktop.
Save MarkPraschan/79036ed5909495a51f2052c4b8a1e787 to your computer and use it in GitHub Desktop.
Declare post types for Yoast's Orphaned Content filter (wpseo_orphaned_post_types)
add_filter( 'wpseo_orphaned_post_types', 'set_wpseo_orphaned_post_types');
function set_wpseo_orphaned_post_types( $post_types ) {
$post_types = array(''); // empty array disables the orhpaned content filter for all post types
return $post_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment