rewrite_rules_array and YoastSEO
-
Hi,
YoastSEO does not output the custom URLs added by rewrite_rules_array.
I hope you have some good ideas.I’ve added the following URL
I added post_type to the URL of the taxonomy term archive to display articles filtered by post type. There is no problem showing this archive.function com_url_rewrite_rules($rules) { $add_rules = array(); $add_rules['products/page/([0-9]+)/?'] = 'index.php?&paged=$matches[1]&post_type=products'; $add_rules['products/([^/]+)/([^/]+)/page/([0-9]+)/?'] = 'index.php?taxonomy=$matches[1]&term=$matches[2]&paged=$matches[3]&post_type=products'; $add_rules['products/([^/]+)/([^/]+)/?'] = 'index.php?&taxonomy=$matches[1]&term=$matches[2]&post_type=products'; add_action('rewrite_rules_array', 'com_url_rewrite_rules');
YoastSEO is unable to call the taxonomy template, resulting in an error.
The error is below:
Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [SEO – Search Appearance] menu and set up a template.I figured that if there was a filter or something that could call SEO template as an archive for a term, even if both taxnomy and post_type are set, it would be possible.
Best regards,
yumsun
- The topic ‘rewrite_rules_array and YoastSEO’ is closed to new replies.