I am having a problem right now. I also used this line of code
function sitemap_exclude_post_type( $value, $post_type ) {
if ( $post_type == 'listings' ) {
return true;
}
}
However, I tried to check the post type so that I would know if it’s working by including var_dump in it. As shown below:
function sitemap_exclude_post_type( $value, $post_type ) {
if ( $post_type == 'listings' ) {
return true;
var_dump($post_type);
}
}
Suddenly, it shows list of post types so I knew it worked somehow. Once I removed the var_dump, it wouldn’t go out. Please help.