Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. /**
  2.  * Filter decision if post type is excluded from the XML sitemap.
  3.  *
  4.  * @param bool   $exclude Default false.
  5.  * @param string $type    Post type name.
  6.  */
  7. add_filter( 'rank_math/sitemap/exclude_post_type', function( $exclude, $type ){
  8.     if ( 'kc-section' === $type ) {
  9.         return true;
  10.     }
  11.  
  12.     return $exclude;
  13. }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement