The problem is that id
is no longer a $_GET
variable, and is instead a WP query variable, so use the get_query_var
function instead
Related Posts:
- remove “index.php” from permalinks
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- flexible rewrite ‘ramble’ URLs with WordPress
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- How to Modify Existing Rewrite Rules?
- custom permalink/shortlink with base62 encoded post ID
- Getting back a permalink from custom url
- Multiple Taxonomy Items for Separate URLs
- Using a template file for a specific custom URL
- Added a prefix in URL permalink structure but the old structure still working!
- a way to support totally different url structure
- Standard Htaccess directives disappear by themselves
- Need help with add_rewrite_rule
- Stop WordPress appending `-2` to the end of my url after i change it
- Get current URL (permalink) without /page/{pagenum}/
- How to get pretty URLs with add_query_arg in permalinks
- Custom post type permalink endpoint
- permalink independent on the post’s name stored in the database
- Update URL Snippet to Canonical Permalink URL
- why does anchor name add a slash to url?
- How to create a permalink structure for posts in a specific category
- How to make draft posts or posts in review accessible via full url / slug?
- Using two permalinks for one post
- How to increase the character limit for post name of 200?
- Change website URL without breaking links or images? WP 3.3
- Rewrite url / permalink for default archive – yearly / monthly
- Rewrite rule never matching
- WordPress 3.4 Permalinks Redirection Problem
- Child pages with same slug
- Permalinks, Rewrites, Get Variables, Oh My!
- Change permalink for a single post entry
- Using ‘Primary Category’ in URL
- When is it a good idea to build a permalink structure from scratch?
- Confusion about how a URL is being parsed
- How to reset canonical URLs / fix redirect loop
- Permalinks: Page Not Found
- How to show the homepage on a different url, like site.com/blog instead of site.com?
- wordpress api using rest_route for other pages
- how to add rewrite rule to wordpress default post type
- Remove custom taxonomy base from URL
- Is a permastruct possible on pages?
- Rewrite rule for a query string
- How do I add /blog/ as a prefix to permalink structure for posts, categories & tags?
- Force wordpress to display page with same url structure as categories
- How can i have a custom post type with more slugs for each post?
- URL rewriting: removing the site’s basename for a specific category
- Custom permalink for specific category
- Rewrite rule intended for CPTs gives 404 for pages
- Rewrite URLs for LeadPages due to subdirectory installation
- Permalink structure between 2 custom post types and a taxonomy
- display dynamic content based on url slug on custom page
- How to generate a list of all urls
- Pre-populate Slug / Permalink with URL
- How to use all tags in post permalinks
- Custom rewrite rule ignored
- Unique one time use URL
- Remove some rewrite rules in wordpress
- Remove parent page from url
- Problems with rewrite rule
- Problem with parent page slug only in WordPress admin
- “-2” Being added to end of URL (no duplicate pages, no pages in trash)
- add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
- Change permalinks for specific pages
- Add custom query vars to pretty permalinks
- How can you create a Permalink structure on a WordPress site?
- Rewrite rule not passing variable
- replacing post ID by custom post name in url
- Post with no tag permalink problem
- How to remove slug from front page?
- rewrite based slug standar post wp
- Adding custom query var to a single post without redirecting to its root slug
- assets aren’t loading on a page but loads on others? slug permalink conflict?
- remove SLASH on single_post but KEEP on categories and parent pages
- WordPress keeps removing query var from the URL
- Fire a code when permalinks updated
- Change Project permalink to custom URL
- Flush rewrite rules with scheduled event (cron)
- Multiple URL rewrite rules and get every prams
- Extra url paths as variable
- Passing parameter through permalink structure
- How to create a standard WP Page that has the same url as an archive
- Add slug to default post permalinks ONLY
- Rewrite posts url as they’re all children of a page
- Get value from URL with different types of parameters
- Pretty Filter URL
- How to change URL of my pages?
- Added incorrect rewrite rule now getting an error
- When using number in url it is redircting to same page but when using character it redirects to 404
- Add Custom Pagination Permalink
- Prevent guessing slug
- Why doesn’t WP update my .htaccess file?
- ReWrite Permalink to New Permalink Nginx
- WordPress permalink still not working (error or not understood?)
- Custom Permalink Base
- Change permalink in wp-property
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- WordPress keep redirecting me to random URLs
- Add additional URL variations for a Post
- Remove parent product category slug from product_cat url woocommerce
- make a new structure tag that does some processing