Rewrite rule is catching pages not posts

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

Custom URL scheme – paramters on custom post type

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/