Help Desk

'Find out more' when hovering over event in monthly view

  • Posts: 31 Topics: 17
    | Permalink

    Hi
    when viewing the monthly calendar on a small screen it has a helpful ‘find out more’ at the end of the excerpt – does anyone know how to make it do this for bigger screens too? I’m scared of php and js but more confident with css!

    many thanks
    AJ

    Posts: 6240 Topics: 17
    | Permalink

    Hi AJ!

    Thanks for getting in touch!

    If you want to add a “Find out more…” link to the tooltip when hovering over the events in the month view, I would suggest overriding the tooltip.php template to make that happen. You can learn more about overriding calendar templates in our Themer’s Guide, but it basically boils down to this:

    • Make a copy of the tooltip.php template. It is located at wp-content/plugins/the-events-calendar/src/views/month/tooltip.php
    • Make a new folder in your theme called tribe-events
    • Make a new folder in that one called month
    • Drop your copied tooltip.php file in that last folder

    Now that the template is in your theme, you can modify it to suit your needs. In this case, add the following line of code after line 27 of the template:

    <a href="[[=raw permalink]]">Find out more...</a>

    Will that work for you? Please let me know. 🙂

    Best,
    Victor

    Posts: 31 Topics: 17
    | Permalink

    Hi Victor

    almost worked but not quite! I certainly got the ‘Find out more’ to show on hover but the link/url it takes us to is something like <<=raw permalink>> ie a 404 page.

    Any ideas?

    thanks
    AJ

    Posts: 6240 Topics: 17
    | Permalink

    Hello AJ!

    I’m sorry, the code I pasted got broken by the editor. I fixed it but I’ll paste it again just in case:

    <a href="[[=raw permalink]]">Find out more...</a>

    Let me know if it works.

    Cheers!
    Victor

    Posts: 31 Topics: 17
    | Permalink

    Many thanks yes that works. Brill!

    Posts: 6240 Topics: 17
    | Permalink

    Hi AJ!

    I’m glad it worked out for you! Thanks for following up to let us know about it.

    Don’t hesitate to open a new thread if anything else comes up 🙂

    Cheers!
    Victor

    | Permalink