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
- How does WordPress create URLs that Apache knows about?
- Stop WordPress appending `-2` to the end of my url after i change it
- Get default permalink structure from pretty URL’s
- Get current URL (permalink) without /page/{pagenum}/
- Rewrite Rule for Multilingual Website, Like qTranslate?
- How to get pretty URLs with add_query_arg in permalinks
- Creating custom permalink structure for languages
- Custom post type permalink endpoint
- Getting the Site URL Including the Front Base
- How to use relative links on my pages?
- WordPress Permalink changes to question mark (?) in URL
- Adding another word in front of post url
- How to prevent apostrophes and quotes from appearing in permalinks?
- permalink independent on the post’s name stored in the database
- Regex in add_rewrite_tag not accepting OR operators?
- Removing hierarchical pages in the permalink
- How to add a custom URL placeholder to author archives?
- Update URL Snippet to Canonical Permalink URL
- why does anchor name add a slash to url?
- “.#[random-char-string]” being inserted at end of URLs
- Permalink/Pagination issue: Category base name same as page name
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Pretty Permalinks
- Make post slug have priority over category slug
- How to create a permalink structure for posts in a specific category
- How to get url of a post from admin panel
- How to Remove Slug From Database?
- How to make draft posts or posts in review accessible via full url / slug?
- Remove subfolders from URL
- Limiting the number of words or characters in the slug/permalink
- Custom Rewrite with Query vars
- Using two permalinks for one post
- add_rewrite_rule with 3 or fewer matches?
- Permalinks for WooCommerce Categories and Subcategories
- How to increase the character limit for post name of 200?
- How to get the post id from a permalink?
- Change the custom post type permalink
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- How to change URL structure for pagination pages?
- Change website URL without breaking links or images? WP 3.3
- Rewrite url / permalink for default archive – yearly / monthly
- Rewriting permalinks with custom posts
- Rewrite rule never matching
- WordPress 3.4 Permalinks Redirection Problem
- Child pages with same slug
- Make attachment pages require a base url
- Permalinks, Rewrites, Get Variables, Oh My!
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Date archive permalink modification
- Change permalink for a single post entry
- How to Remove -14 from WordPress URL (Permalink)
- Using ‘Primary Category’ in URL
- rewrite_rule for custom post type doesn’t affect get_permalink
- Add ‘articles’ prefix before blog posts url without affecting pagination
- display URL or permalink instead of page title in dashboard
- How to get wordpress link to fully evaluate when coming from facebook
- How can I get the permalink of a post before it is published?
- Change permalink rule if category is called “uncategorized”
- Add a URL prefix to permalinks of News category and sub-categories of posts only
- Can two products with the same name but different category produce unique URLs?
- Page Attachment Permalink Structure based on Menu Order?
- When is it a good idea to build a permalink structure from scratch?
- query_vars in plugin not working?
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- echo post-permalink without http and www
- Call to a member function add_rule() on a non-object
- I need a custom permalink for my website
- Get canonical link
- Confusion about how a URL is being parsed
- Get closest page ID from URL
- How to reset canonical URLs / fix redirect loop
- CSS not loaded when omitting www. part of URL
- Permalinks: Page Not Found
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Setting up two separate blogs while using WordPress as a CMS
- How to show the homepage on a different url, like site.com/blog instead of site.com?
- Re-write specific custom post type category URL to go to another page
- Custom permalink for search and pagination
- How to add_rewrite_rule with two parameters to a single view page?
- wordpress api using rest_route for other pages
- Get page by path – honoring permalink settings (urls w/slashes)
- Rewrite Rule for default post type
- Change blog segment of URL
- how to add rewrite rule to wordpress default post type
- RewriteRule accepts numbers but not letters in tag
- Remove custom taxonomy base from URL
- Custom query var rewriting with only variable