Change Admin URL
I’ve always just included a redirect in htaccess, but I’m sure there’s a fancier way. redirect 301 /wp-admin /wordpress/wp-admin
I’ve always just included a redirect in htaccess, but I’m sure there’s a fancier way. redirect 301 /wp-admin /wordpress/wp-admin
How to programatically create a simple HTML page using the permalink of a WordPress post?
add_rewrite_rule is not fired
Pretty Permalink parsing happens internally within WordPress, any permalink setting other than default uses the same .htaccess rules, because all variants simply direct any request which is not a physical directory or file to WordPress.
Rewriting URLs with query strings and preserving them
add_rewrite_rule works only with one “directory”
The rel canonical link points to http://www.teamrealty.ca/listing-details/, which returns a 500 internal server error response code. You can try to remove the canonical action before wp_head() is called on those pages: remove_action( ‘wp_head’, ‘rel_canonical’ );
It wouldn’t give you exactly that format, but you could add a rewrite endpoint named slide and get the format http://www.sitename.com/gallery/slide/2/: function wpd_add_slide_endpoint(){ add_rewrite_endpoint( ‘slide’, EP_PAGES ); } add_action( ‘init’, ‘wpd_add_slide_endpoint’ ); Then you could localize your script to pass the slide number, using get_query_var(‘slide’) to fetch the current value.
When you register a new post type for the first time, you need to visit Settings -> Permalinks so WordPress can set up the permalink rules for it. You don’t even need to hit save, visiting the page is enough.
plugin_dir_url( __FILE__ ) will return the URL of the current files directory. Usage would be: $url = plugin_dir_url( __FILE__ ) . ‘/newfolder/newfolder/index.php’;