Limit amount of events on a home page

Home Forums Calendar Products Events Calendar PRO Limit amount of events on a home page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1329149
    Anna Young
    Participant

    Hello,

    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,
    Anna

    #1330571
    Geoff B.
    Member

    Good 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:

    1. https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/
    2. 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.

    #1332436
    Anna Young
    Participant

    Hi 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,
    Anna

    #1332642
    Geoff B.
    Member

    Good 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.

    #1333579
    Anna Young
    Participant

    No 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)

    #1333767
    Geoff B.
    Member

    Good 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.

    #1334093
    Anna Young
    Participant

    It worked PERFECTLY!
    Thank you so much!

    #1336317
    Nico
    Member

    Thanks 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Limit amount of events on a home page’ is closed to new replies.