Site logo

Archived topic

GeneratePress theme & GP Premium plugin conflict with The Events Calendar

7 replies · Started by Brenden on February 10, 2022

Viewing posts 1–8 of 8

On the Events archive page, the calendar displays twice. The second calendar doesn't load when the page loads, but only when you scroll down the page a little bit. Also, single events load below the second calendar.

I created a staging version of the site for testing. This issue only happens when GP Premium plugin is activated.

https://homeschoolcstg.wpengine.com/events/

Could you help me troubleshoot the issue?

Hi Brenden,

If that only happens when GP Premium is activated, can you disable all GP premium modules at appearance > Generatepress.

If the issue goes away, try activate the modules one at a time to find out which module is causing the issue.

Let me know :)

This issue only occurs when the Blog module is activated.

Hi Brenden,

With Blog module enabled, can you try going to Appearance > Customize > Layout > Blog and disable infinite scroll and check the page again?

That fixed it. Thank you!

That's a workaround but if you wish to use the infinite scroll feature on other archive page, you may have to resort to custom PHP snippet.

I believe the best arrangement would be to disable infinite scroll, specifically on TEC pages.

Something like this should do it:

add_filter( 'option_generate_blog_settings', 'remove_infinite_scroll_on_tec_pages' );
function remove_infinite_scroll_on_tec_pages( $options ) {
     global $wp_query;
     if ( get_post_type(get_queried_object_id()) == 'tribe_events' || $wp_query->tribe_is_event == 1 ) {
          $options['infinite_scroll'] = false;
          $options['infinite_scroll_button'] = false;
     }
  
    return $options;
}

Here's how to add PHP - https://docs.generatepress.com/article/adding-php/

This is optional. You'll only need this if you wish to use infinite scroll on some archive pages. :)

I decided to remove Infinite Scroll as other options will work just fine, but thank you for providing a workaround in case it was required.

No problem. Let us know if you need further help. :D

This archived topic is closed to new replies.