Home › Forums › Calendar Products › Events Calendar PRO › Limit amount of events on a home page
- This topic has 8 replies, 3 voices, and was last updated 8 years, 8 months ago by
Anna Young.
-
AuthorPosts
-
August 1, 2017 at 4:00 pm #1329149
Anna Young
ParticipantHello,
I’ve actually asked you this question before.
I would like to have only 3 first event showing up on a home page and I was advised to use this code:
[tribe_events view=”photo” limit=”3″]Right now I have 4 event and all 4 show up on a home page:
https://kingofkingswc.com/Am I doing something wrong? How do I limit to 3 events only?
Thank you,
AnnaAugust 3, 2017 at 11:50 pm #1330571Geoff B.
MemberGood evening Anna and welcome back!
Thank you for reaching out to us.
I would love to help you with this topic.The reason why this is not working as expected is because the limit argument only works for widget shortcodes, not for the full view shortcodes:
- https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/
- https://theeventscalendar.com/knowledgebase/embedding-calendar-views-tribe_events-shortcode/
Therefore [tribe_events view=”photo” limit=”3″] will not work, but [tribe_events_list limit=”10″]
will.A lot of people simply use the list widget with thumbnails to “emulate” the photo view for such needs.
Let me know if that helps.
Have a great day!
Geoff B.
August 8, 2017 at 1:38 pm #1332436Anna Young
ParticipantHi Geoff,
I tred to use [tribe_events_list limit=”3″] (i need only 3 events to show up on a home page) and it still shows all 4 and it’s not a photo view. So this option doesn’t work for me.How do I show only 3 events in photo view?
Thank you,
AnnaAugust 8, 2017 at 10:58 pm #1332642Geoff B.
MemberGood evening Anna,
I was about to tell you that we can always cheat a bit with CSS, but a quick look at https://kingofkingswc.com/ tells me you have already found a solution.
Can you confirm?
Best regards,
Geoff B.
August 10, 2017 at 9:55 am #1333579Anna Young
ParticipantNo Geoff, I still have this problem.
https://kingofkingswc.com/(I just had to remove one event for technical reasons, but now I added another one, and it doesn’t look good)
August 10, 2017 at 2:46 pm #1333767Geoff B.
MemberGood evening Anna,
In that case, you can control the photo view on the home page with a bit of CSS.
Try adding the following CSS rule to your style.css file or in your Custom CSS metabox:
.home #tribe-events-photo-events .tribe-events-photo-event+.tribe-events-photo-event+.tribe-events-photo-event+.tribe-events-photo-event {display:none !important}That should limit the number of events to 3 in the photo view on the home page.
Let me know how that goes.
Best regards,
Geoff B.August 11, 2017 at 8:57 am #1334093Anna Young
ParticipantIt worked PERFECTLY!
Thank you so much!August 16, 2017 at 1:12 pm #1336317Nico
MemberThanks for confirming Anna, glad to hear Geoff could help you out on this one 🙂
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘Limit amount of events on a home page’ is closed to new replies.
