Category slugs are missing ending slash
-
A website of a client of my has a few category pages and custom taxonomy archive pages. All of the archive pages are missing the trailing slash in the cannonical URL.
I’ve fixxed this issue with:
function wpseo_canonical_home_url_fix( $canonical_url ) { // Simply add a trailing slash if it hasn't one return trailingslashit( $canonical_url ); } add_filter( 'wpseo_canonical', 'wpseo_canonical_home_url_fix' );
Expect I’m also running WPML, and the alternate lang URL’s are also missing the trailing slash.
As soon as I disable the Yoast plugin, all URL’s are returing back to normal. Somehow yoast is removing the trailing slash from category pages.
I have also the ‘force the /’ option enabled (under advanced).
It doesn’t matter if I change themes, problem still excists after change.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Category slugs are missing ending slash’ is closed to new replies.