WordPress.org

Ready to get started?Download WordPress

Forums

All-in-One Event Calendar
[resolved] Change Calendar event link (2 posts)

  1. eschmidt99
    Member
    Posted 1 year ago #

    Hello,

    I was hoping someone would be able to help with this (and I'm willing to hack the code as necessary).

    I need to change where the calendar actually links to. Currently if you click on an event on the calendar, it takes you to the event page. However, I need it to link to another page on the site that's related to the event.

    Is there a way to change where the calendar links to? I can add custom fields to the individual events pages, e.g. the URL to which I'd like to link to from the calendar.

    Thank you very much for your help.

    Eric

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

  2. eschmidt99
    Member
    Posted 1 year ago #

    Figured it out.

    In each of the theme calendar files such as week.php, month.php, etc..., I changed:

    href="<?php echo esc_attr( get_permalink( $event->post_id ) ) . $event->instance_id ?>"

    to:

    href="<?php the_field('url',$event->post_id); ?>"

    (I'm using the Advanced Custom Fields plugin, but you can put anything in there).

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags