You’re using the reserved public query variable name
as your custom one.
It can e.g. affect the canonical redirect by setting page_id
and name
for a different page.
Change it to something else to avoid possible name collision, like kenan_video_slug
:
add_rewrite_rule(
'^watch/([^/]*)$',
'index.php?pagename=watch&kenan_video_slug=$matches[1]',
'top'
);
Note that your rewrite will override the content pagination for the watch
page.
Remember to flush the rewrite rules.
Related Posts:
- Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123
- add_rewrite_rule won’t work
- Pass query param to custom page
- How to Change 404 page title
- How to disable page delete
- get_pages() not ordering as it should
- Need help with friendly URL’s in WordPress
- Editing the Number at the end of Page URLs / Editing Page Slugs
- How to build custom WP admin with custom URLs
- Adding Custom Link anchors in the top menu that points to specific sections of the site home page
- How to Add Pages Under Custom Post Type URL Structure?
- Pagination Help on Crazy Custom Authors Page
- WordPress in “Couch Mode”?
- Hide page title in WordPress 3.0
- Selecting An image from the Media LIbrary on the frontend
- Custom protected password page with ACF
- Page load requires a trailing “/” [closed]
- Virtual Pages plugins
- Programmatically add a custom page/path/url/route to WordPress
- What is the most idiomatic way to let clients edit phrases in HTML?
- How to merge all my pages into one, while keeping a menu bar?
- Passing page url into a custom field via the Press-This bookmarklet
- Add filename to attachment page url
- redirect product-category to a custom page
- How can I get the page url slug when ‘post_name’ returns an id?
- custom headers for static home page and posts page
- How can I get the intended URL in a 404?
- Viewing category pages without the word ‘category’ in URL
- Creating Search Engine Friendly URL’s with Word Press
- How to Add a Rewrite Rule for Only One Page?
- Fatal error: Call to a member function add_rewrite_tag() on a non-object in /wp-includes/taxonomy.php on line 333
- Show posts on a page based on a category and tag(s)
- Split Conference WordPress Page in different years
- How to get custom page template being edited in gutenberg editor
- How to change the category url jusy show /category/%category_id% in wordpress?
- Control Content On Non-Blog Pages
- custom meta box for page default template
- Best practice – pages – ACF or inline coding
- change url for static files in /wp-admin with a cdn url
- How to hook up search results page to a back-end page?
- How to structure model showcase
- 404 (category, pages, archives) when using custom rewrite rules
- Best structure / rewrite rules to achieve the following url
- Redirect to another page using contact form 7? [closed]
- How to customize
- Add a searchbox to the body of a page
- website with pretty permalinks except pagination
- Create page as a file in my theme?
- Is it advisable to use `add_rewrite_rule()` to serve a custom page?
- Featured Image If Else Condition
- add_feed rewrite overwriting standard permalinks
- Insert menu with a custom walker into page / post body using shortcode?
- How to create “custom page types” with different custom fields in them?
- How to create custom search page
- Creating php pages in wordpress and assigning them to wordpress pages
- How to display page ids as page slug names?
- How to create custom layouts and static pages in themes for clients
- Many Rewrite Parameters/Rules
- How to make the Pages in WordPress Customized?
- Creating custom page template
- Change Site Logo or Menu Logo Per Page
- change top banner content on specific page
- How to add page content into another page
- Display a specified content on a Page and all its child pages
- title tag function
- query variables for custom taxonomies
- Use a custom page with dynamic content as a user profile page
- I want to embed mystream video in my wordpress site
- Swap home page based on user role, Elementor layout breaking
- New to WP: links on static homepage are not working
- Taxonomy template is not reading
- New Page/Post Screen Opens an Existing Post
- Static Page, need Last and Next links at the bottom
- I want to change url structure of my created archieve pages
- How can I create a Custom Page? (not a page template!!)
- URL issue after setting up Custom Structure in Settings >> Permalinks
- wordpress custom posts page not showing
- How to add rewrite rule for product compare page?
- Replace an URL with an new URL which has a “?” in it
- How to serve an already coded html page in a WP page, to assign a simpler url
- Page Permalinks: Custom URLs
- Admin menu disable new/delete page
- Show different pages on site depending on user choice
- WordPress post submit page
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Allow arbitrary text after page URL
- Call a duplicate registration form with other url
- Best way to create a page outside of the pages list
- Is it possible to rewrite a page url Without setting the permalinks to Post Name?
- Want home page to click through to two different page types
- Custom single page based on which custom page template is selected
- How to duplicate “Pages” section in the control panel?
- Page template with custom html fields inside a content
- Is there a way to have information on one page automatically feed into another? [closed]
- How do I fix the url when clicking on portfolio item?
- How to apply styles to the custom page template
- Instead of Custom CSS Theme CSS is loading
- How can I make a search term redirect to a page
- Custom CSS working on home page but not on NEW created PAGE
- Create a page for each database table entries