Remove Trailing Slash from Events / List / Month / Date
-
Hello,
The current WordPress permalinks this site is using is:
/%postname%
However, the List / Month / Date and internal URLs are using the permalinks with the trailing slash at the end like this:
/events/list/
/events/month/
/events/today/
The same happens with events:
/events/2024-10-03/
/events/2024-10-03/?ical=1
/events/2024-10-03/?outlook-ical=1
/events/2024-10-04/
/events/2024-10-04/?ical=1
/events/2024-10-04/?outlook-ical=1
/events/2024-10-05/
/events/2024-10-05/?ical=1
/events/2024-10-05/?outlook-ical=1
We don’t understand why, if WordPress uses a custom permalink, The Events Calendar does not respect the same permalink structure.
Here is what the current page is using:<?php
use Tribe\Events\Views\V2\Template_Bootstrap;
echo Tribe(Template_Bootstrap::class) ->get_view_html();
?>We also tested using in functions this code:
function untrailingslashit( $value ) {
return rtrim( $value, '/\' );
}This creates a massive list of internal redirects from Events and eats the crawl budget.
How can we remove the trailing slash at the end?
- You must be logged in to reply to this topic.