Photo view – Presenting different number of events in different pages?

Home Forums Calendar Products Events Calendar PRO Photo view – Presenting different number of events in different pages?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1324374
    Ricardo Santos
    Participant

    Hi
    I am having a similar issue that is reported here:
    https://theeventscalendar.com/support/forums/topic/can-a-photo-view-be-applied-to-upcoming-events/

    The code snippet reported at the bottom:
    https://gist.github.com/elimn/8fd157765d5aea751e66526183b8c8c7

    works, but it is applied to all photo views.

    I want to have the photo view in one page (frontpage) with few events and another , also with the photo view with all of them.

    I was thinking about doing the filtering per page where the Photo View is placed.
    So from the code snippet, I need to transform the filtering

    if ( ‘postsPerPage’ === $name && tribe_is_photo() )
    into something like
    if ( ‘postsPerPage’ === $name && tribe_is_photo() && ‘all-events-here’ === tribe_get_slug() ) {

    Is there any method doing this?

    Any suggestion how to achieve this?

    Do you have plans about adding the “limit” attribute to the photo view short cut.

    #1325038
    Jennifer
    Keymaster

    Hi Ricardo,

    Thanks for reaching out!

    For the home page, try adding is_home() or is_front_page() as conditions.

    It sounds like there is one other specific page you’d like to adjust the number of events for? For this case, you can use the is_page( ‘your-page’ ) function to check if you are on that page.

    It is possible to list events in photo view using the [tribe_events view=”photo”] shortcode, but unfortunately it does not currently support the “limit” parameter. If this is a feature you would like to see added in the future, please let us know over in our Feature Ideas forum! This is what we use to gauge user interest in new features and help guide future development efforts.

    I hope that helps! Please let me know if you have any questions!

    Thanks,

    Jennifer

    #1325231
    Ricardo Santos
    Participant

    Thanks Jennifer.
    That solved my problem.
    I also added a vote for this feature to be added in the future.

    #1325261
    Jennifer
    Keymaster

    Great! I’m glad to hear it’s working, and thanks for voting on that feature!

    Since this thread has been marked “resolved”, I’ll go ahead and close it out. Please feel free to open a new one if you have any other questions!

    Thanks,

    Jennifer

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Photo view – Presenting different number of events in different pages?’ is closed to new replies.