The current permalink structure for the posts that I am trying to modify includes a date, and it is configured in the settings page like: "/%year%/%monthnum%/%day%/%category%/%postname%/"
An example post url: http://example.com/2016/09/11/category/child-category/long-post-slug-is-printed-here/
My problem is that I can't figure out how to modify this permalink structure for posts that are tagged with a specific tag, so for example, if I have a tag "permalink-struc-2", and I add it to my post, I would like to then rewrite the permalink to: http://example.com/category/child-category/long-post-slug-is-printed-here/ The date should be stripped from the post permalink.
I've tried using a wp filter "post_link"
add_filter('post_link', array($this, 'change_permalink_date_structure'), 1, 3);
But what ends up happening is that the url is changed, but when I try accessing the post from the shortened url, it is still redirected to the original one - > http://example.com/2016/09/11/category/child-category/long-post-slug-is-printed-here/
Could anyone help on this issue please?
Thanks