Different number of results for list view and photo view.

Home Forums Calendar Products Events Calendar PRO Different number of results for list view and photo view.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1016433
    fifteen15studios
    Participant

    Hi Modern Tribe,

    I would like to know how I can set the default number of events to appear for list view and photo view if I want the two numbers to be different? I’d like the list view to be 10 and photo to be about 100. I know how to change the default in the WordPress area which asks how many posts to show per page, but is there an easy way to differentiate this?

    Thanks!
    Brendan

    #1016581
    Brian
    Member

    Hi,

    I have this snippet to show all the events in Photo View:

    https://gist.github.com/jesseeproductions/96a6fcce931375c043cf

    You can change the -1 to 100 in the snippet and add it to your theme’s functions.php and that will change just the photo view then.

    Let me know if that works.

    Thanks

    #1018750
    fifteen15studios
    Participant

    Asked and answered! Thanks! That worked perfectly. 🙂

    How would I know that, though? Is there somewhere I can look to have figured that out?

    #1018845
    Brian
    Member

    Hi,

    I do not think we have documentation on this exactly. It is more of a WordPress snippet then a Events Calendar Snippet.

    Here is more information about WordPress’s pre_get_posts hook:

    https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

    All I did was use a standard WordPress snippet and add one of our conditionals to it:

    https://gist.github.com/jesseeproductions/903f5ca75877b713c674

    Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Different number of results for list view and photo view.’ is closed to new replies.