Hello,
I have a problem with pagination on category pages.
I have permalinks set up on the site that do not end with a “/” at the end.
Specifically, the permalink looks like this: /%postname% – https://prnt.sc/Pdoc8uXFzxea
The problem occurs on category pages and occurs when we are on the 2nd and further paginated page. When you hover over the number 1 or the “<” sign, it shows a URL that is terminated with a “/” at the end. In the lower left corner you can see the URL https://imgur.com/a/oxzPkMF
Example: https://test.com/category/ – should be https://test.com/category
On the other hand, the pagination of page 2,3, etc. is already correct.
How, can I from the first paginated page remove this ending with “/”?
This is important to me because it is problematic under SEO because there is a 301 redirect on this URL. That is, when you click on the first paginated page there is a 301 redirect from https://test.com/category/ to https://test.com/category.
Hello,
This is quite interesting because the structure you say is the opposite of the WordPress permalinks – https://i.imgur.com/mZgngFt.png
I tried seems to be similar to this one – https://wordpress.org/support/topic/remove-trailing-slash-from-links/
I hope that this will help you, in the meantime, I will document myself more.
Thank you!
I’m using a redirect in htaccess to remove trailing slash from links (it was the first thing I did), but that’s not the point and it’s not the solution. The last slash is only on the pagination. I tested the Newspaper theme locally and there too this problem appears.
It looks like the problem is typically related to the theme and I would like to simply fix it so that the first page paginated along with the “<” sign as I described is not terminated with a slash.
Currently, it doesn’t look good because there is a 301 redirect through it. Google’s robot, instead of immediately going to the correct URL not ending in a slash, has to go through a redirect to get to the correct URL.
Google’s indexing has been getting more and more difficult for some time and I want the crawl budget on my site to be at its best so I’m very anxious to fix this problem.
Please check it out for yourself on a fresh install of the theme and you will see that when you are on the second paginated page and want to go back to the first page (hover over the number 1 or the “<” sign) the URL ending with a slash will appear even as the permalink structure in WordPress indicates otherwise.
Hi,
I made some tests and indeed on category if you hover over the < button the / appears - https://i.imgur.com/he8hBAK.png, but when you actually click on the button the link will not have / - https://i.imgur.com/bVc9hzs.png
In order not to display that / even when hover is done, the theme files must be edited, unfortunately, this will have to be done with every update.
The file path to the flex loop elements is wp-content/plugins/td-cloud-library/shortcodes/common/tdb_loop.php and wp-content/plugins/td-cloud-library/shortcodes/common/tdb_loop_2.php
Thank you!
The screenshot you uploaded https://imgur.com/bVc9hzs – appears when clicked without a slash, because there is a 301 redirect.
That’s exactly what I mean, to get rid of the slashes in those URLs on page one and the “<” sign, so that there is no 301 redirect and the google robot doesn’t have to go through the redirect just hit the right URL right away.
Can’t you just fix this and release an update to the theme? I care about updates and constantly fixing this myself manually in the code will be a nuisance.
Hi,
“The screenshot you uploaded https://imgur.com/bVc9hzs – appears when clicked without a slash because there is a 301 redirect.”
This was on my local test and I do not have any 301 redirect set, I only set the permalinks without the slash.
I also asked a developer to look to see what should stop appearing here https://imgur.com/he8hBAK like this, but I still haven’t received a reply
Thank you!
Hello @djovanov!
Do you have the latest update of the theme and plugins?
If yes, the we can take a look at your issue. Contact us via email at contact@tagdiv.com and provide the following:
– admin URL and credentials
– cPanel URL and credentials
– a link to this topic in order to identify you
Thank you!
I founded two such issues reported: https://core.trac.wordpress.org/ticket/51662 and https://core.trac.wordpress.org/ticket/52419
It’s a wordpress bug