Home Forums General Issues How to link special posts (like Events) to a WP Post?


How to link special posts (like Events) to a WP Post?

  • I have a theme which doesn’t support The Event Calendar Pro’s Event’s edit (i.e. Events don’t feature the same rich additions as in the theme’s Posts editor).
    Therefore I want to link with a custom field a relationship that will just display the POST rather than the EVENT when clicking the event title off the calendar view.

    Has anyone been able to easily do this?

    I have setup a relationship field which appears in my Events editor which I can pick list a related POST. However nothing happens which leads me to believe Ive got to edit some php’s.

    I have over a 100 posts schedules already for a festival and I really don’t want to enter them all over again or convert with a plugin over to Event pages. Its going to be easier for me to link the basic event details off the calendar straight to my chosen Post page.

    Anyone done this?

  • You may have found a solution or moved on.

    For anyone looking to do something similar what you need to do is edit the template that displays the event, for example single-event.php. In the template you would get the post from the relationship field and display the content of the post rather than the event. You should probably add a canonical tag as well to mitigate duplicate content.

    Another alternative would be to get the post from the relationship field and then redirect the request to the post. This would probably be a better solution as it would avoid duplicate content.

    An even better alternative would be to edit the theme template that displays the links to the events and modify them at that point to link directly to the posts instead of the events.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to link special posts (like Events) to a WP Post?’ is closed to new replies.