Modern Events Calendar - Is there a back button/link that can go on the single event listing?

Hi, I’m using Modern Events Calendar and when you click to view a single event listing, there isn’t a back button/link to go back to the main Events page. I’d have thought this was a standard feature but I can’t find it anywhere in the settings! It’s probably right in front of me, but I can’t see it and I’ve looked through the documentation but can’t seem to find it in there either.

Hope you can help!

Thanks!

Hi @core365,

Thank you for writing in, regretfully Modern Events Calendar does not offer that option, what you can do is enable the Breadcrumbs option under Theme Options > Header if you’re using the standard header, or add a Breadcrumbs element on your header if you have a custom header built-in (Pro’s) Header builder.

Cheers!

Hi @friech,

Thanks for the suggestion, however it doesn’t look that great to be honest using breadcrumbs for the ‘back’ link! I’ve used some code previously supplied by yourselves to add ‘back’ and ‘next’ links on the blog, would this be able to be utilised for the events calendar? The thing is though, I haven’t got a clue where to start with adapting it! I’d appreciate any pointers you’d be able to help with!

function x_add_post_navigation() {
		if ( is_singular('post') ) {
  			echo '<div class="navigation-post"><a href="https://www.urltogohere/blog/">< Back to main page</a>';
			x_entry_navigation();
			echo '</div>';
		}
}
add_action('x_before_the_content_end', 'x_add_post_navigation');

Thanks!

Hi @core365,

You can replace the x provided hook x_before_the_content_end with one provided by the Modern Events Calendar here. Try the do_action('mec_before_main_content');. Also, remove the if ( is_singular('post') ) condition from your code, as that is for blog posts.

Regretfully we can not provide support for customization, it would ultimately be your responsibility to take it from here.

Thanks,

Hi @friech,

That’s done it! Thank you so much! I’ve just got some CSS tweaking to do to get it styled how I want, but the back button is there, yay!

Thanks again for your time and help!

You’re welcome!
We’re glad @Friech were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.