Is there a way to make the "find out more" link go directly to event (anchor)?

Home Forums Calendar Products Events Calendar PRO Is there a way to make the "find out more" link go directly to event (anchor)?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1312241
    Marsha
    Participant

    From List View, when I click on a single event’s title or “Find out more”, it leads me to the single event page for the event. That works fine and as expected. however, on mobile, users have to scroll down past the header on the single event view (instead of jumping directly to it). Not a horrible experience, but would be nice to cut to the chase and just skip the header altogether on the single event view (without removing the header). Is there a way to do this with some anchor or something?

    #1314931
    Jennifer
    Keymaster

    Hi Marsha,

    Thanks for reaching out!

    You could add #tribe-events-content to the end of the link by editing this template: wp-content/plugins/the-events-calendar/src/views/list/single-event.php. Our themer’s guide has instructions on how to edit the template.

    However, to do this conditionally for mobile devices, you would need to add some Javascript. I found an example for you here to help get you started.

    Please let me know if you have any questions on this!

    Thanks,

    Jennifer

    #1315449
    Marsha
    Participant

    Hi Jennifer,

    Thanks for the info! When I’m in single-event.php, I’m still not entirely sure where to add that slug. Can you tell me where it would go?

    I appreciate your help.

    Thanks!

    #1315745
    Jennifer
    Keymaster

    Hi Marsha,

    No problem!

    The link can be found on line 107:

    " class="tribe-events-read-more" rel="bookmark"> »

    So, to add the ID, you could do something like:

    " class="tribe-events-read-more" rel="bookmark"> »

    This will add it for all devices. To get it for only certain devices, you could target the “tribe-events-read-more” class with JS to conditionally append “#tribe-events-content” to the end of the URL.

    Let me know if that works for you!

    Thanks,

    Jennifer

    #1316031
    Marsha
    Participant

    This reply is private.

    #1317674
    Jennifer
    Keymaster

    This reply is private.

    #1320465
    Marsha
    Participant

    This reply is private.

    #1321553
    Jennifer
    Keymaster

    Glad to hear you got it worked out! I’ll go ahead and close out this thread, but please feel free to open a new one if you have any further questions.

    Thanks,

    Jennifer

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Is there a way to make the "find out more" link go directly to event (anchor)?’ is closed to new replies.