Home › Forums › Calendar Products › Events Calendar PRO › Photo view – Presenting different number of events in different pages?
- This topic has 3 replies, 2 voices, and was last updated 6 years, 9 months ago by Jennifer.
-
AuthorPosts
-
July 21, 2017 at 8:57 am #1324374Ricardo SantosParticipant
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/8fd157765d5aea751e66526183b8c8c7works, 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 filteringif ( ‘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.
July 23, 2017 at 1:09 am #1325038JenniferKeymasterHi 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
July 24, 2017 at 4:23 am #1325231Ricardo SantosParticipantThanks Jennifer.
That solved my problem.
I also added a vote for this feature to be added in the future.July 24, 2017 at 6:19 am #1325261JenniferKeymasterGreat! 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
-
AuthorPosts
- The topic ‘Photo view – Presenting different number of events in different pages?’ is closed to new replies.