WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Recurring events url (5 posts)

  1. inksprite
    Member
    Posted 2 years ago #

    I'm using the events_list shortcode to create a category page for events. It looks like this:

    [events_list category="435" limit="10" pagination="1" recurring="1" format="<div class='mosaic-block bar'><a href='#_EVENTURL' class='mosaic-overlay'><div class='details'><h3>#_NAME</h3><div class='programa-date'>#M #j @ #g:#i #A</div><p class='detailed'>#_EXCERPT</p></div></a><div class='mosaic-backdrop'><a href='#_EVENTURL'>#_EVENTIMAGE{286,286}</a></div></div>"]

    When there are recurring events I only want one of each recurring event to show up. That is why I am using the recurring="1" parameter. It seems to work almost fine except that the #_EVENT_URL placeholder seems to change its function when using the recurring parameter.

    When I don't use the recurring parameter, all the events show and each link goes to it respective page. When I do use the recurring parameter, only one of each recurring event shows, but the link becomes broken.

    Without the recurring parameter the links look like this:
    http://www.mywebsite.com/events/test-recur-2012-02-02/

    With the recurring parameter the links look like this:
    http://www.mywebsite.com/events-recurring/test-recur/

    When events-recurring is in the url, the link breaks. It would be better if the links looked like this:
    http://www.mywebsite.com/events/test-recur/

    Because, then it just takes you to the earliest event. The url changes to:
    http://www.mywebsite.com/events/test-recur-2012-02-02/

    How do I fix it?

    http://wordpress.org/extend/plugins/events-manager/

  2. inksprite
    Member
    Posted 2 years ago #

    I found a quick and dirty way to fix it, but I'm wondering if there is a legitimate way. Below is what I did:

    In file em-posts.php
    at line 149
    Replace
    'rewrite' => array('slug' => 'events-recurring','with_front'=>false),

    With
    'rewrite' => array('slug' => 'events','with_front'=>false),

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    recurring events don't have an event page (although we will probably bring this in another format soon). I should probably change the docs to highlight this.

  4. Annette Pretorius
    Member
    Posted 1 year ago #

    Hi Marcus, I'm trying to do exactly the same thing, but inksprite's quick and dirty fix did not work for me. At the essence of what I'd like to know is: Did recurring event templates end up getting their own pages in release 5.2.6? Annette

    PS: I've been trying to resolve this issue in this post: http://wordpress.org/support/topic/recurring1-shortcode-breaks-links?replies=6

    In desperation I revisited this page and realized what you are saying and that if the recurring event templates don't get their own pages what I'm trying to do can't happen.

  5. Annette Pretorius
    Member
    Posted 1 year ago #

    I fixed my issue by updating WordPress and discovering that my version of EM was out of date and updating that too. No more problems. Thanks for building an excellent plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic