Event category archives are only displaying 3 posts

Home Forums Calendar Products Events Calendar PRO Event category archives are only displaying 3 posts

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28227
    Andrew
    Member

    How would I change the number of posts displaying on an event category page? For example:
    this page, is only displaying 3 posts. In the settings, I have the “Number of events to show per page” set at 10. My event categories are ignoring this. If you go to this page it seems to work fine, just not on my event category pages.

    #28236
    Barry
    Member

    Hi Andrew,

    The short answer is that it shouldn’t be limited to just three events.

    Do you have any custom code in there that you might have introduced to change the event query, and/or can you try our standard troubleshooting steps:

    • Ensure your Modern Tribe plugins are all up-to-date (we are currently on 2.0.10 for both The Events Calendar and Events Calendar PRO)
    • Deactivate all other plugins. At the same time, change to a default, unmodified theme such as Twenty Eleven or Twenty Ten
    • Now test to see if the problem remains; if it is solved reactivate everything one-by-one testing at each stage to identify which if any component is conflicting

    Does that all make sense? Let me know how you get on with this!

    #28268
    Andrew
    Member

    I do have some custom code on list.php, but nothing to change the query. I just realized it’s probably my parent theme, Evolution. There’s a setting in the theme options…Number of Posts displayed on Category page. It’s set to 3. Go figure. Anyhow I’m not sure how to have the event category pages over rule this. Any thoughts?

    #28276
    Barry
    Member

    Hi Andrew: it’s difficult to provide a solution without knowing how the theme enforces this, but you could try adding some code like this https://gist.github.com/4118303 to your theme’s functions.php file.

    If that doesn’t work you will need to seek advice from the theme vendor/author as there are actually a few different ways they might implement this.

    #28692
    Barry
    Member

    Did you arrive at a solution here Andrew?

    #28697
    Andrew
    Member

    I have found a solution. I was able to track down in the functions file where they were controlling the is_archive posts per page and modify it a bit. I’m not sure if this is correct, but it seems to work.

    elseif ( $query->is_archive ) {
    if ( ! ($query->queried_object->taxonomy === TribeEvents::TAXONOMY) ) return;
    $query->set( ‘posts_per_page’, et_get_option( $shortname . ‘_archivenum_posts’ ) );
    }

    #28705
    Barry
    Member

    Great, so long as it works that’s the main thing 🙂

    It’s difficult to comment on whether it’s correct or not, without being familiar with your theme, but you can always let us know if further problems crop up in the future.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Event category archives are only displaying 3 posts’ is closed to new replies.