• mihaigrigori

    (@mihaigrigori)


    I’ve noticed this method in wp-includes/classes.php

    function add_rewrite_tag($tag, $pattern, $query)

    I want instead of using %year% in the permalink structure to have a custom tag taht will display the 2 digit value for the year (e.g. %shortyear%).
    Does anyone have an idea about I should use this function to do that?
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • davidchait

    (@davidchait)

    if you check the wp-hackers mailing list archives and search for rewrite, there was a discussion that ended up with someone posting a sample plugin for alternate date format permalinks. worth a search.

    -d

    Thread Starter mihaigrigori

    (@mihaigrigori)

    Can u give me a more precise hint please? An url or something…

    “wp-hackers mailing list” – where in the world is this?

    Thanks

    Thread Starter mihaigrigori

    (@mihaigrigori)

    This page is ironic:
    https://comox.textdrive.com/pipermail/wp-hackers/

    Did wordpress exist 20 years ago when this seems to be created?

    moshu

    (@moshu)

    All the WP related mailing lists are here:
    https://lists.automattic.com/mailman/listinfo

    Thread Starter mihaigrigori

    (@mihaigrigori)

    OK – I’m done searching there.
    Can anyoane help me with this?

    I want to be able to have my permalinks use the 2(two) digit value for year rather than four

    %year% The year of the post, four digits, for example 2004
    ????? The year of the post, two digits, for example 04

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding a new rewrite tag’ is closed to new replies.