Try add_rewrite_rule(), here’s tutorial on how to use it https://www.pmg.com/blog/a-mostly-complete-guide-to-the-wordpress-rewrite-api/
Related Posts:
- How to build custom WP admin with custom URLs
- Many Rewrite Parameters/Rules
- Page Permalinks: Custom URLs
- How to Change 404 page title
- Adding Custom Link anchors in the top menu that points to specific sections of the site home page
- Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123
- How to change URL Custom Page?
- Passing page url into a custom field via the Press-This bookmarklet
- Add filename to attachment page url
- add_rewrite_rule won’t work
- Remove Author Slug & Replace With Username
- How can I get the page url slug when ‘post_name’ returns an id?
- open all .docs in word online
- How can I get the intended URL in a 404?
- Creating Search Engine Friendly URL’s with Word Press
- Why is my mod_rewrite not working?
- URLs and navigation in custom themes
- How to change the category url jusy show /category/%category_id% in wordpress?
- redirect post id to post full url
- change url for static files in /wp-admin with a cdn url
- WordPress 3.0.1 on IIS 6 Web Server PermaLink Issues
- How do I redirect a post url to a custom url?
- website with pretty permalinks except pagination
- add_feed rewrite overwriting standard permalinks
- Custom Post Type, post-formats associated to custom post type > 404 archives
- How do I get posts to appear at mydomain.com/blog?
- title tag function
- query variables for custom taxonomies
- How do I run a web app in my WordPress theme without the “wp-content/theme/…/webapp” in URL?
- New to WP: links on static homepage are not working
- URL issue after setting up Custom Structure in Settings >> Permalinks
- How to assign a default/priority taxonomy to be shown in url in case two taxonomy items are selected
- How to add rewrite rule for product compare page?
- Replace an URL with an new URL which has a “?” in it
- Url rewriting on custom post with CPT UI plugin
- Call a duplicate registration form with other url
- wp_rewrite not working on third level url
- Show post content in two different places without redirect
- Pass query param to custom page
- How do I fix the url when clicking on portfolio item?
- Create a page for each database table entries
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Any post install tips after installing WordPress 3.0.1?
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- How to let a single post have its own domain name
- Redirect to requested page after (custom) login
- How to instantly delete posts/pages permanently?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How could we customize the all posts page in the admin panel?
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Adding Pagination on a Custom Author Page
- Multiple Tinymce/wp_editor in WordPress >4.8
- How to provide a demonstration of WordPress for new customers
- CPT Loop with ACF and passing ID between Loops
- Showcase elementor templates
- Add clickable arrows to parent menu items with children elements e.g. with
- Display User ID instead of Name or Username
- React Router with WordPress
- Woocomerce custom billing address fields display in order details [closed]
- Bind JS event to WordPress control customizer
- How can I setup up an a pre-populated pdf based on what was entered? [closed]
- Get rid of title from static front page
- Make custom page look exactly as homepage
- $wpdb->insert running multiple times?
- Get wordpress taxonomy slug name(s) to use as div class
- Why does my Posts page only show a single post when using Thematic?
- Specific colours for wordpress author ids
- How do I list custom taxonomy terms with the links?
- How to unpixelate logo?
- Using a .pdf file as a page in wordpress
- Remove header title form page through CSS [closed]
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- custom css and javascript not working on page defined as template?
- Missing current_page_item in custom menu
- Attach File Funcion for Common people
- How to get Previous Visited Page Information
- How to bulk Update URLs to new values?
- Custom admin menu items
- Taxonomy template is not reading
- Conflict between Yoast SEO and my custom theme
- WordPress Customizer: Check for value of CSS selector and replace it
- url redirect none www to www
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- How to remove Base URL Duplication?
- Displaying all Custom fields on post except some
- How to appoint different users to different pages?
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- Is there a way to hide a user’s posts from their Activity feed?
- customize footer widgets area
- Accessing + retrieving custom database in WordPress
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- Please give me the rewrite rules for my ugly urls