Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Provide ability to add dynamic urls and pages to the sitemap #9608

Closed
Pcosta88 opened this issue May 1, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@Pcosta88
Copy link
Contributor

commented May 1, 2018

Yoast is only able to add pages to the sitemap if they have been created. Providing the ability to add dynamic urls/pages to the sitemap will help with SEO as it gives Google more links to index and user experience...as users can then find those urls in the SERPs.

@yoastbot yoastbot added the support label May 1, 2018

@Pcosta88

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2018

Please inform the customer of conversation # 354502 when this conversation has been closed.

@benvaassen

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

@CarolineGeven can you check if there is a filter for this to help the customer? The customer has multiple dynamic generated URLs which aren't changing, these pages are not physically present and he wants to add them to the sitemap.

@CarolineGeven

This comment has been minimized.

Copy link
Member

commented Jul 30, 2018

@benvaassen I can't find any filter that could indicate we have this. I've asked @andizer

@CarolineGeven

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

@benvaassen and @Pcosta88 - the customer can use the following filter:

wpseo_sitemap_{$type}_content

apply_filters( "wpseo_sitemap_{$type}_content", string $content )
Filter to add extra URLs to the XML sitemap by type.

the type is the sitemap type.

Description
Only runs for the first page, not on all.

Parameters
$content
(string) String content to add, defaults to empty.

For more information: https://github.com/Yoast/wordpress-seo/blob/trunk/inc/sitemaps/class-sitemaps-renderer.php#L105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.