Home › Forums › Calendar Products › Events Calendar PRO › Show ALL events in the /events/ page
- This topic has 8 replies, 3 voices, and was last updated 7 years, 5 months ago by Hunter.
-
AuthorPosts
-
October 27, 2016 at 2:50 am #1183625PauParticipant
Dear TECPRO,
My client will like to show ALL forthcoming events on the events page
http://79.170.44.126/ref-spainculturescience.co.uk/events/
I have already set up the number of events to show per page to 102 (more than events we have), but some events to happen on Dec and Jan still not showing
Could you please advise how to do in order that the Events page shows it all?
many thanks as usual
October 27, 2016 at 3:22 pm #1184100HunterModeratorHello,
Welcome back! You could accomplish displaying all future events on your main events page by using the code below. Try adding it to the bottom of your theme’s functions.php file and adjust the $value =’30’ to whatever number of events you’d like to display. Let me know how things work for you.
/**
* Set the events per page on photo view.
*/
function tribe_photo_posts_per_page( $value, $name, $default ){
if ( 'postsPerPage' === $name && tribe_is_photo() ) {
$value = '30';
}
return $value;
}
add_filter( 'tribe_get_option', 'tribe_photo_posts_per_page', 10, 3 );Best of luck and thanks for reaching out. Cheers!
October 28, 2016 at 10:30 am #1184562PauParticipantHi Hunter, thanks
I tried to paste this code on the functions.php
/** * Set the events per page on photo view. */ function tribe_photo_posts_per_page( $value, $name, $default ){ if ( 'postsPerPage' === $name && tribe_is_photo() ) { $value = '30'; } return $value; } add_filter( 'tribe_get_option', 'tribe_photo_posts_per_page', 10, 3 );
but the site crashed (and I restored the previous version, so now is back)
what could have I done wrong?
October 29, 2016 at 12:43 am #1184798HunterModeratorHello,
If you could, paste the entire contents of your theme’s functions.php file into Pastebin.com and share a link with me as a private reply. I’ll respond back with code that should work. Thanks for the update and have a great rest of the weekend. Cheers!
October 29, 2016 at 1:14 am #1184814PauParticipantOctober 31, 2016 at 1:59 pm #1185464HunterModeratorThank you for sending that over. Please try replacing your current theme’s functions.php file with the code from this Pastebin snippet. Let me know how things work out for you. For future reference, since you have a closing PHP bracket at the very end of your theme’s functions.php file – which looks like this: ?> – you’ll need to enter code in before that closing bracket. I hope this clarifies how things work and keep me posted on your progress. Cheers!
October 31, 2016 at 3:20 pm #1185520PauParticipantYes, it makes sense, Hunter
thank you very much!November 1, 2016 at 5:31 pm #1186085HunterModeratorGreat! I’ll close this thread out but please open a new one if you have any more questions or concerns. Cheers!
-
AuthorPosts
- The topic ‘Show ALL events in the /events/ page’ is closed to new replies.