Support » Plugins and Hacks » [Resolved] Year in permalink url

[Resolved] Year in permalink url

Viewing 15 replies - 1 through 15 (of 16 total)
  • i am looking for the same thing … not with the year but to generate a more friedly looking permalink for repeating events…

    i found this http://wordpress.org/support/topic/method-to-update-post_title-and-post_name-for-custom-post?replies=8 which explains how to hook into the post-object before it is commited to the db …

    there you could just change the post_name (which is the slug and the permalink) and add some extra meta data from the events object to it

    maybe this will help you:


    its not perfect but maybe a way for you…

    i needed the location and the date in the slug

    the-80s-party-5 -> location-slug-y-m-d-the-80s-party

    when you change the location of the event, you have to update twice … something to do when the hooks are fired and the data is saved to mySQL…

    will check it, thanks….

    I’m wondering what the plugin guys (marcus or angelo_nwl) have to say about this. If a feature like this will be included.

    check this thread: http://wordpress.org/support/topic/created-a-custom-slug-function

    i posted an update of the function

    i think it would be awesome if this kind of function would find its way into the plugin, so that anybody could take controll over the slug

    it would be a good way for SEO as well

    is an output like this possible ?

    and did you fix the ‘having to update twice’ ?

    the update twice bug is gone!

    but! if you want to have slashes in the url its not just a custom slug… you have to write some rewrite urls and put in some handlers for them … bla bla…

    short version: nope 😉

    it is a SLUG generator not a path generator…

    Hmmm… well the year isn’t over… Still have about 6 months left to search…

    But is it as simple as creating a new rewrite rule for custom post type event ? Because ‘all I wanna do’ is insert the publication year.



    NetWebLogic Support

    Beee, I’m wondering if you couldn’t use scharc’s code to make the event slug event-name-2014?

    It’s not exactly what you wanted, but doesn’t that solve your problem?

    I could, but I could do than manually myself. I don’t need a script for that. I still prefer events/year/slug sorry

    Plugin Author Marcus


    NetWebLogic Support

    we won’t takle this ourselves at the moment, WP ideally should implement this – http://core.trac.wordpress.org/ticket/21374

    then let’s hope they do before dec 31 😉

    Plugin Author Marcus


    NetWebLogic Support

    i wouldn’t hold my breath 🙂

    It’s not the best way, but I think that I’ll rename all slugs from /slug/ to /2013-slug/ by hand, so I can use the ‘normal’ names next year.

    Plugin Author Marcus


    NetWebLogic Support

    that’d probably be the ‘best’ way.

    you could even hook into WP’s slug generation and manually add that when saving event post types. no real difference between a dash and a slash as far as SEs are concerned I think.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Year in permalink url’ is closed to new replies.