Tailoring your site to meet your unique needs is not just an expectation— it’s a possibility.

The Events Calendar plugin is a powerful tool for managing events on your website, but there may come a time when you need to tweak its default settings to meet your needs.

One common request is changing the URL of the “All Events” link, which by default points to the main events page. When looking to direct users to a custom Events page ( for example, when using a page builder plugin to create a custom page or just by using the tribe_events shortcode on another page), altering this link can significantly enhance user navigation and site functionality.

In this article, we’ll share some ways to achieve that goal!

The URL added to the “All Events” link is something created by the tribe_get_events_link() function, which also provides a filter using the same name, tribe_get_events_link.

You can use the filter to change the behavior of the function.

By default, it’ll get the default events URL defined in the plugin settings, but you can edit that by adding the following PHP snippet to your theme’s functions.php file or by using the Code Snippets plugin.

add_filter( 'tribe_get_events_link', function() {
	return '/your-custom-url-here';
} );

If you prefer doing a template override, that’s also possible but note that the default tribe_get_events_link function can be used by other features provided by our plugin, so option 1 shared above will be the best alternative.

That said, let’s see how to change that by doing a template override for those using the Blocks Editor or the Classic Editor.

Blocks Editor

First, copy the file /wp-content/plugins/the-events-calendar/src/views/single-event/back-link.php to your theme folder /wp-content/themes/[your-theme]/tribe/events/single-event/back-link.php and look for the following item:

<p class="tribe-events-back">
	<a href="<?php echo esc_url( tribe_get_events_link() ); ?>">
		&laquo; <?php printf( $label, $events_label_plural ); ?>
	</a>
</p>

There, edit the esc_url() function to use a custom URL instead of the tribe_get_events_link() function:

<p class="tribe-events-back">
	<a href="<?php echo esc_url( '/your-custom-url-here' ); ?>">
		&laquo; <?php printf( $label, $events_label_plural ); ?>
	</a>
</p>

Classic Editor

Another template file should be used if you’re still using the Classic Editor.

Copy the file /wp-content/plugin/the-events-calendar/src/views/single-event.php to your theme folder at /wp-content/themes/[your-theme]/tribe-events/single-event.php and look for the following item:

<p class="tribe-events-back">
     <a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( '&laquo; ' . esc_html_x( 'All %s', '%s Events plural label', 'the-events-calendar' ), $events_label_plural ); ?></a>
</p>

There, edit the esc_url() function to use a custom URL instead of the tribe_get_events_link() function:

<p class="tribe-events-back">
    <a href="<?php echo esc_url( '/your-custom-url-here' ); ?>"> <?php printf( '&laquo; ' . esc_html_x( 'All %s', '%s Events plural label', 'the-events-calendar' ), $events_label_plural ); ?></a>
</p>

An SEO perspective on that change

Note that when creating a custom Events page, the default /events page will still exist and can be indexed by Google, so we also recommend redirecting the default /events page to your custom events page URL.

There are many ways to achieve that. If you’re using an SEO plugin, we recommend checking if they provide that feature (for example, the Yoast SEO plugin provides that on their paid version only, while the free Rank Math SEO provides that), and there’s also the Redirection plugin to help you creating redirects.