Hi @mellowmarsh,
The “premium” theme team UpSolution has registered the post type us_header in all their themes, and that templating post type shouldn’t have rewrite access — yet it does.
Unfortunately, they disregarded the issue.
But I digress. To quickly resolve this, add the following snippet to your (child-)theme’s functions.php file:
add_filter( 'the_seo_framework_sitemap_exclude_cpt', function( $excluded = array() ) {
$excluded[] = 'us_header';
return $excluded;
}, 10 );
I hope this helps 🙂 Cheers!
-
This reply was modified 7 years, 11 months ago by
Sybre Waaijer. Reason: Code error
Hi @cybr,
Thanks for the quick response! That’s unfortunate that they haven’t fixed that issue. I added that code into my child theme functions.php file and now get this error: “Parse error: syntax error, unexpected ‘;’ in /wp-content/themes/Impreza-child/functions.php on line 5
”
Any idea what I did wrong?
Thanks!
Hi @mellowmarsh,
My bad! I made a typo, and just fixed the code above.
Here it is again for good measure:
add_filter( 'the_seo_framework_sitemap_exclude_cpt', function( $excluded = array() ) {
$excluded[] = 'us_header';
return $excluded;
}, 10 );
Cheers 🙂
Hi @cybr,
Awesome thank you! No error now but the /us_header/site-header/ is still showing up in my sitemap.
Any ideas?
Thanks!
Hi @mellowmarsh,
That’s great!
Update any post, or change a setting back and forth in the SEO settings, and the sitemap should refresh 🙂
Hi @cybr,
Perfect! All good now, I really appreciate your help. This is my first time using your plugin and I love it. Awesome work!
Thanks again, Cheers! 🙂