I have publications and I want to simply add year and month to the permalink. Currently the year and month of publication is added to the post as a meta value. I've set up publications as a custom post type and created taxonomy for the specific title of the publication. I would like the permalink to be:

I simply want to add the meta values for the publication year and month to the permalink.

So far, I've been able to pull the year and month published and add it to the url but unfortunately I keep getting a 404 when I try to access posts. I think I'm taking a wrong turn with one of my steps below ...

Any help would be appreciated.

These are the steps I did in the following order:

Since I was adding publication-year and publication-month to the url, I was reading that I had to make WordPress aware of these custom querystring variables. I added the following functions to register these custom variables: