Archived topic
pages/posts archive navigation adds a trailing slash to archive first page link
5 replies · Started by Tobias on September 24, 2018
Hi,
we have a url structure without a trailing slash for our categories like:
http://www.myurl.com/cat1
http://www.myurl.com/cat2
http://www.myurl.com/cat3
Our archive navigation looks like this:
Prev, 1,2,3,4....20, Next
The Link to the first page [1] has a trailing slash attached, which is not correct. The url should be:
http://www.myurl.com/cat1
and not:
http://www.myurl.com/cat1/
The other links are correct like:
http://www.myurl.com/cat1/page/2
http://www.myurl.com/cat1/page/3
http://www.myurl.com/cat1/page/4
...
Thank you,
Tobias
Hi there,
That actually isn't handled by GP.
If you activate a twenty-series theme, it should show the same thing.
This post might offer some insight:
https://generatepress.com/forums/topic/using-custom-urls-for-category-pages/#post-684623
If not then you will have to check with WordPress support to see if they have a way:
https://wordpress.org/support/
Hope this helps :)
Hi, okay thank you for your support.
Is there any way to diable the output of the archive navigation completely?
Thank you.
There are quite a few articles on Stackoverflow relating to the trailing slash. Something like this:
https://stackoverflow.com/questions/8558234/remove-trailing-slash-using-htaccess-in-wordpress
Thank you. Is there a way to disable the navigation completly not not only hide it via css?
I installed another navigation plugin.
Thank you.
Try this filter:
add_action( 'wp', function() {
add_filter( 'generate_show_post_navigation', '__return_false' );
} );