admin管理员组文章数量:1125003
I want to create children pages to some archives on wordpress with Yoast SEO.
Today, i have /tags/{tagName}
and i want to add sub pages to this archive.
The goal is to have:
/tags/{tagName}
main tag page with some infos/tags/{tagName}/news
with a list of post/tags/{tagName}/videos
with a list of custom post type/tags/{tagName}/bios
with a list of custom taxonomy
Each children need to get his own yoast seo meta (title, description, canonical) to not have duplicate metas.
How can i archive this ?
My idea was to add rewrite rules to add these slugs to archive pages:
/tags/({$post_type_nicename})/news/?$ => index.php?post_tag=$matches[1]&sub_page=news
/tags/({$post_type_nicename})/news/{$wp_rewrite->pagination_base}/?([0-9]{1,})/?$ => index.php?post_tag=$matches[1]&paged=$matches[2]&sub_page=news
And use sub_page
query var to know on wich sub page i am.
But, with this kind of solution, yoast seo metas are the same on each page.
Thank you!
本文标签: How to create archive child pages with good Yoast SEO meta
版权声明:本文标题:How to create archive child pages with good Yoast SEO meta? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736654171a1946211.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论