WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Can I have category slug in event permalink? (3 posts)

  1. baritoneuk
    Member
    Posted 2 years ago #

    Is it possible to have the event category in the event permalink?

    For example if an event (with slug "summer-2012") has a category slug "conference", can the event have a permalink:
    http://website.com/events/conferences/summer-2012/

    ?

    The permalinks section doesn't allow me to put in %category% in it

    http://wordpress.org/extend/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    No - by default WordPress doesn't handle %category% (or %event-category% in this case) tags in the permalink structure of custom post types.

    There are work-arounds that you can do to get the structure after. Specifically if you take the event permalink structure to be:

    event/%event-category%

    and the event category to have structure

    event

    Then add the rule (with add_rewrite_rule)

    event/%event-category%/%event%

    to point the event with slug given by %event% - then that should work.

    If you're not sure how to do this, you might want to look at some of the answers given at WordPress Stack Exchange.

    In particular you may find this question helpful: http://wordpress.stackexchange.com/questions/21022/mixing-custom-post-type-and-taxonomy-rewrite-structures

  3. baritoneuk
    Member
    Posted 2 years ago #

    Thanks, Stephen. I hadn't realised that was a WordPress thing for custom post types. I'll check the Stack Exchange post when my brain is working- it looks really helpful.

    I have another question, but I'll leave that for another post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic