-
Hello,
I used RankMath with Woocommerce and Permalink plugin and blog posts.
Has it was not possible to have the followings Permalink : /blog/%category%/%postname%/ but /blog/c/%category%/%postname%/
I have added as you advice (https://support.rankmath.com/ticket/can-i-keep-part-of-my-category-base-url/) in Category Base: blog/.
Disable the sitemap for blogs category and add in functions.php :
///// Rank Math : Add Extra URLs in the Sitemap
add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);
add_action( ‘rank_math/sitemap/post_content’, function() {
return ‘<url>
<loc>https://domain.com/blog/category-01/</loc>
<lastmod>2022-03-31T06:45:00+00:00</lastmod>
</url>However i have now two canonical in blog categories pages :
<link rel=”canonical” href=”https://domain.com/blog/category-01/”>
<link rel=”canonical” href=”https://domain.com/blog/./category-01/”><link rel=”canonical” href=”https://domain.com/blog/category-02/”>
<link rel=”canonical” href=”https://domain.com/blog/./category-02/”>Do you know how can I remove the second canonical url with /./ from those specifics pages.
Best regards,
Emmanuel
The ticket ‘Delete second canonical url with /./’ is closed to new replies.