Is it possible to change the permalink of a custom posttype?
I have a custom post type called "events", I have made a page called archive-event.php and this is reached by /event.php
is it possible to change this into something else? Like /foo.php?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
When you register your post type you can set the archive page slug to anything you want via the
If you want single events to have the same slug as the archive, you can set both via:
'rewrite' => array( 'slug' => 'foo' )
Or if you want the archive to have a different slug, set that separately via
'has_archive' => 'foo'