How i can add video, audio and image sitemap in existing wordpress sitemap
How i can add video, audio and image sitemap in existing wordpress sitemap
How i can add video, audio and image sitemap in existing wordpress sitemap
New blog created with WordPress is not crawlable by sitemap software
Exclude member-only content on HTML Sitemap
Sitemap for hundred thousands Posts WordPress Site
XML sitemap in WordPress 5 without plugin?
You probably need to “flush” your permalinks. Turn the sitemap feature off, (yaost?), change your permalinks to default and back, turn on the sitemap feature again. I like using a separate plugin to handle this instead of using Yoast. I don’t like their naming convention/structure, and this issue seems to happen a lot.
The “memory exhausted” error in question happened because of this part in your function: ‘parent’ => $next_page -> post_parent, which should actually be ‘parent’ => $next_page -> ID (or I’d omit the unnecessary spaces, i.e. I’d use ‘parent’ => $next_page->ID). And the error can be illustrated like so: $cur_page = get_post( 123 ); // assume … Read more
Possible mistake: depends on what you mean by ‘page’. Search engines would count archives pages as pages, whereas WordPress will only count post-type page, not archives nor posts.
You’re looking for breadcrumbs, not a site map. There are plenty of plugins in the WordPress repository that might suit your purpose: breadcrumbs plugins.
The code below does work, just make sure you are editing the correct themes function.php file! // Remove specific pages function gt_disable_sitemap_specific_page($args, $post_type) { if (‘page’ !== $post_type) return $args; $args[‘post__not_in’] = isset($args[‘post__not_in’]) ? $args[‘post__not_in’] : array(); $args[‘post__not_in’][] = 221; //locations $args[‘post__not_in’][] = 261; //blog return $args; } add_filter(‘wp_sitemaps_posts_query_args’, ‘gt_disable_sitemap_specific_page’, 10, 2);