I decided on a different approach. Keep the default permalinks in admin, then add a rewrite to allow /course:
add_rewrite_rule('^course/([^/]*)/?', 'index.php?event=$matches[1]', 'top'); // single event
Then I can update my theme templates with the course/ urls where needed.
Related Posts:
- ‘post_type_link’ filter not working
- Is there an action for when permalinks are rebuilt?
- How to get url of a post from admin panel
- What is the action or filter for changing permalink in Edit Post/Page?
- Why I can’t change the permalink of this page?
- How to hook into permalink when publishing-saving post?
- How can I make my .htaccess file writeable by wp-admin?
- Changing post content on save, using updated fields
- Editing Pages Give 404 Error After WordPress Upgrade in Admin Panel
- Edit page slug after save, cause 404 by linked pages
- rewrite rule to redirect to the most recent date permalink
- WordPress Installed But Not Showing Up! [closed]
- How to Custom Edit Post Title & Permalink Slug?
- Broken wordpress site, non-working links and no access to wp-admin page
- Modify post slug before saving
- Fatal Error when trying to load Permalinks page on WP admin [closed]
- All files in public_html, Cannot launch WordPress site via wp-admin
- 404 page not found – Yet open admin page it works
- Where is wordpress redirecting wp-admin/admin/dashboard to wp-admin and how to turn it off
- Can you customize the automatic permalink population on new posts?
- Change default URL (or permalinks) in the back-end
- where is permalink info stored in database?
- How can I reverse engineer a Permalink to Find the Page?
- Mapping Domains to Permalinks (not multisite)
- How to remove dates from existing permalinks?
- WordPress Permalink changes to question mark (?) in URL
- How would I create a different permalink structure for pages and posts?
- My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
- Can WordPress realistically handle a site with 500 ‘pages’?
- How to prevent the default home rewrite to a static page
- How to get a page url by a page id?
- CPT archive 404ing when using a custom taxonomy name as a variable
- How to change “permalink” structure in “WordPress Thesis” theme?
- Performance and styles not working fine after changing permalink structure
- Maintaining two permalink structures
- Adding body class to login page?
- removing index.php IIS 7.5 webconfig
- Permalinks Messed up
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- 404 Page Not Found for Only One Post
- How to 301 all posts
- WordPress within specific sub-directories, implicitly not root
- Custom attachment permalink structure [closed]
- Call to a member function add_rule() on a non-object
- Link to blog index from template
- How to change Post ID during import
- Is there anything built into the WordPress core to enable me to get the relative path from the “permalink structure” option
- Permalink change made author archive vanished
- WordPress 404 in development area
- Custom Permalink
- Pagination Issue – /page/2 404
- How to stop WordPress from removing & from URL?
- Nginx Rewrite Rule:: index.html added to every permalink
- Share same Slug for a Custom Post Type and 2 Taxonomies
- Remove metabox from WordPress menu editor page?
- Redirect a Blogger Page URL to wordpress
- How to prevent redirect when using the term “page” in query string?
- Return value of get_permalink(0) and get_the_title(0)
- Custom function making troubles in get_permalink for ACF relationship fields
- .htaccess rewriterule being ignored – tyring to remove dates from WP posts
- How to redirect RSS feeds to Feedburner and keep pretty permalinks?
- Apply function only if end of url has /amp/ [closed]
- WordPress Permalinks 404 bug with “next” button
- Combine category AND custom taxonomy in permalink structure
- home_url on IIS missing permalink index.php
- Update the permalinks in posts (not domain change)
- permalink and add_rewrite_rule – error 404
- Page Navigation is not working with permalink structure
- Remove Parents From Permalink of Hierarchical Taxonomy
- Default Permalink Structure for Pages
- Read more block is appending /#more-{post_id} to the link
- Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure
- admin_post_nopriv_{$action} is secure?
- Edit the output of a filter
- Why does one of my pages not have the option to edit the link?
- Custom Permalink Structure for The Events Calendar
- WP permalink working, but why content doesn’t display
- Giving specific category posts its own permalink structure returns 404
- I have Akamai pointing to a WordPress installation with a different URL. Is there a way to make WordPress use this for link generation?
- Issue with wp_insert_post when modifying permalinks with “.html” extension
- How to allow different authors to use same post slug?
- while changing permalink, page redirected you too many times
- how to have same rewrite rules for 2 different post type?
- How can I add my own ‘read more’ or ‘after the jump’ type of link to the article page?
- Issue with my links or permalinks
- Why can’t I save permalink “360” for a page?
- How to change permalink structure and keep permalinks for old posts
- Pointing, two or more archived Blog posts to the same permalink (Single post page)
- Is there a way to remove the option to modify the Slug in post.php
- Issues with WordPress permalinks
- Only homepage working correctly, 404 error on everything else
- Search points to /search/?s=KEYWORD instead of /search/KEYWORD
- How to change pagination base from slash to query form?
- WP Custom Permalink Filter
- standard post with extra parameter brings permalink problem
- redirect old pages by .htaccess
- Siteurl code for links
- Redirect Loops Problems
- Remove parent product category slug from product_cat url woocommerce