Home › Forums › Calendar Products › Events Calendar PRO › Event category archives are only displaying 3 posts
- This topic has 6 replies, 2 voices, and was last updated 11 years, 5 months ago by Barry.
-
AuthorPosts
-
November 18, 2012 at 8:03 pm #28227AndrewMember
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.November 19, 2012 at 7:09 am #28236BarryMemberHi 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!
November 19, 2012 at 10:52 pm #28268AndrewMemberI 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?
November 20, 2012 at 6:39 am #28276BarryMemberHi 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.
November 29, 2012 at 8:46 am #28692BarryMemberDid you arrive at a solution here Andrew?
November 29, 2012 at 9:24 am #28697AndrewMemberI 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’ ) );
}November 29, 2012 at 11:45 am #28705BarryMemberGreat, 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.
-
AuthorPosts
- The topic ‘Event category archives are only displaying 3 posts’ is closed to new replies.