EO_Calendar Shortcode: Link to month

WordPress Event Management, Calendars & Registration Forums General Question EO_Calendar Shortcode: Link to month

This topic contains 2 replies, has 2 voices, and was last updated by  Alex Stanhope 3 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40100

    Hi Stephen,

    Just a quick question about the calendar widget if that’s alright?

    I was wondering how easy it would be to make the title (current month) clickable as a link to the relevant archive? Ideally the link would take users to the following page as an example: https://mysite.com/events/on/2021/08/

    Any thoughts on how this could be achieved? It would be great to have something like this in place as it would make things even more usable for site visitors.

    I will very much look forward to any pointers you might have.

    Alex

    Alex Stanhope
    #40117

    Hi Alex,

    The relevant line line is here. If you replaced it with the following:

    $title = sprintf( '<caption><a href="%s">%s</a></caption>', eo_get_event_archive_link( $month->format('Y'), $month->format('m')), esc_html( eo_format_datetime( $month, 'F Y' ) ) );
    

    That would add a link

    Stephen Harris
    #40122

    Hi Stephen,

    That’s brilliant, thanks! Just the ticket for what I was looking to achieve, but I was just wondering if you had any thoughts on a custom function to make it “upgrade safe” as it were?

    Alex Stanhope
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.