Show ALL events in the /events/ page

Home Forums Calendar Products Events Calendar PRO Show ALL events in the /events/ page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1183625
    Pau
    Participant

    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

    #1184100
    Hunter
    Moderator

    Hello,

    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!

    #1184562
    Pau
    Participant

    Hi 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?

    #1184798
    Hunter
    Moderator

    Hello,

    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!

    #1184814
    Pau
    Participant

    Sure Hunter, appreciated

    http://pastebin.com/S1ny4UV4

    thanks

    #1185464
    Hunter
    Moderator

    Thank 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!

    #1185520
    Pau
    Participant

    Yes, it makes sense, Hunter
    thank you very much!

    #1186085
    Hunter
    Moderator

    Great! I’ll close this thread out but please open a new one if you have any more questions or concerns. Cheers!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Show ALL events in the /events/ page’ is closed to new replies.