Home » Php » php – In wordpress how to change permalink structure of custom type from test.com/movies/%name% to test.com/movies/%name%/%year%

php – In wordpress how to change permalink structure of custom type from test.com/movies/%name% to test.com/movies/%name%/%year%

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have a site on wordpress with a custom post type: Movies. In this custom post type I can define the name of the movie and the year of the movie.

Currently my permalinks are:

test.com/movies/%name%

But I want them to be:

test.com/movies/%name%/%year%

How can I define or overwrite the permalink structure?

Thanks!

How to&Answers: