WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Change Calendar event link

[Resolved] Change Calendar event link

  • eschmidt99
    Member

    @eschmidt99

    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/

Viewing 1 replies (of 1 total)
  • eschmidt99
    Member

    @eschmidt99

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Change Calendar event link’ is closed to new replies.