get_permalink is getting old rewrite rule
get_permalink is getting old rewrite rule
get_permalink is getting old rewrite rule
What you want is a simple endpoint, use add_rewrite_enpoint instead of adding a rule and query var. function wpd_author_endpoint(){ add_rewrite_endpoint( ‘pending’, EP_AUTHORS ); } add_action( ‘init’, ‘wpd_author_endpoint’ );
Rewrite rule is not working
You are using the pagename query var, so, like the name suggests, you are requesting a page with the specified name and not other type of content/post. If you want the rewrite rule works for all types of post (except attachments), you can use the p query var passing the post_ID as value. See the … Read more
Try rewrite endpoints: function wpse_143634_endpoint() { add_rewrite_endpoint( ‘info’, EP_PERMALINK ); } add_action( ‘init’, ‘wpse_143634_endpoint’ ); Now you’ll find you can visit any post and tack on info/whatever to the URL – WordPress will still load the post, except now you’ll have get_query_var( ‘info’ ) == ‘whatever’. Further reading: https://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/
Nothing in $_GET will be set for internal rewrite rules, that’s not how they work. Look in the query vars for idx-action– either get_query_var(‘idx-action’) or $wp_query->query_vars[‘idx-action’].
URL rewrite results in a 404, but everything should work!
URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
URL Rewrite for CPT single posts
add_rewrite_rule is not fired