Eventon events archive page not loading pro theme

Hi there,

I am using Eventon as a plugin for our calendars and it works fine on 99% of the pages, but for some reason there is a conflict on the archive page and single event pages. The header I assigned to those pages does not load.

Pages where the plugin works: https://eemeyrin.ch https://eemeyrin.ch/agenda/
Pages where it does not work: https://eemeyrin.ch/evenement/construire-la-famille-de-dieu/ https://eemeyrin.ch/evenement/

I would appreciate your help, thanks in advance

Hello @Ezechias,

Thanks for asking. :slight_smile:

I suggest you to take a look at the solution mentioned in following thread. Please note that the plugin name is different but the logic remains the same.

Thanks.

Hi Prasant, thanks for your help, this seems to be a good lead, but I am unsure what to put in here
if ( is_tax(‘evenement’) ) {

I have tried a few things, but none are working.

Note that I know close to nothing in terms of code :slight_smile:

Hello @Ezechias,

You may update your code and use this:

add_filter('cs_match_header_assignment', 'custom_archive_header');
function custom_archive_header($match) {
	if ( is_tax('event_location') || is_single('ajde_events') ) {
		$match = 1234; // the post ID for your header
	}
	return $match;
} 

Hope this helps. Please let us know how it goes.

Thanks Ruenel, but unfortunately still the same here https://eemeyrin.ch/evenement, https://eemeyrin.ch/evenement/diego-baeza/

Hi @Ezechias,

Those pages still use standard headers, please assign at least a dummy custom Pro header :slight_smile:

Thanks.

HI there,

I tried several times before I contacted the support, but I just don’t know how those pages are called… I tried a few things on the list in my header section, but nothing works. I have created a header called “Evénements” for those pages.

Thanks for your patience :slight_smile:

Hi @Ezechias,

They are archived pages, may I know what header should be assigned to them? That’s because I don’t see any header that has ID of 3711. Maybe that’s the reason since that ID is not existing.


add_filter('cs_match_header_assignment', 'custom_archive_header');
function custom_archive_header($match) {
	if ( is_tax('event_location') || is_single('ajde_events') ) {
		$match = 3711; // the post ID for your header
	}
	return $match;
}

	

You can find the ID of the header by hovering to Edit button and check the task bar.

Then please change this line

if ( is_tax('event_location') || is_single('ajde_events') ) {

with this

if ( is_post_type_archive('ajde_events') || is_single('ajde_events') ) {

Thanks!

Hi there,

We are moving forward, now it works on the page with all the events! https://eemeyrin.ch/evenement/
But still not on single events like this one: https://eemeyrin.ch/evenement/diego-baeza/

The header ID is the right one

Hi @Ezechias,

Ah sorry, please change this

is_single('ajde_events')

to this

is_singular('ajde_events')

The is_singular() is different than is_single()

Hope this helps this time :slight_smile:

Perfect thanks!

Could not have done that by myself…

You’re most welcome!

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