.htaccess RewriteRule to include post type and taxonomy
This rewrite rule will surely work. Add this code to your .htaccess file. RewriteEngine On RewriteRule ^uni/([^/]*)$ /gallery/?university=$1 [L]
This rewrite rule will surely work. Add this code to your .htaccess file. RewriteEngine On RewriteRule ^uni/([^/]*)$ /gallery/?university=$1 [L]
Note to curators/admin: I wanted to leave a comment but I didn’t have enough reputation. I know I am not formally providing an answer, but attempting to help the person asking the question along. Are you using any membership plugins? Can you give us a little more information on the overall site map and functionality? … Read more
Only one thing I can see to solve this problem is to use redirection by .htaccess. But my question is, why don’t you manage to redirect old URLs to the new version, without the /blog ? Because I guess, your concern is most about SEO no ? redirect 301 /blog/ http://www.yourdomain.com/
You have to make your rewrite rules account for the paged parameter, because otherwise they won’t. It would look somewhat like shown below. function test_add_rewrite_rules() { add_rewrite_rule( ‘businesses/(eat|stay|play)/(.+)/page/([0-9]+)/?$’, ‘index.php?post_type=businesses&display_category=$matches[1]&filters=$matches[2]&paged=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘businesses/(eat|stay|play)/page/([0-9]+)/?$’, ‘index.php?post_type=businesses&display_category=$matches[1]&paged=$matches[2]’, ‘top’ ); } add_action( ‘init’, ‘test_add_rewrite_rules’ );
I want to add one extra field to my URLs, I’m using Rewrite functions but it doesn’t work
Are you sure that you have deleted completely all previous pages with the slug ‘news’ ? When you click on Trash, the page/post is only placed into the Trash folder, not deleted. You must then empty the trash folder to completely delete the page. If the old page remains in the trash folder and you … Read more
For normal posts you can set the permalink structure on Settings → Permalinks. All details can be found in the Codex For custom post types you can set the slug when you registering it: add_action( ‘init’, ‘create_posttype’ ); function create_posttype() { register_post_type( ‘cpost’, array( ‘labels’ => array( ‘name’ => __( ‘cpost’ ), ‘singular_name’ => __( … Read more
You can use this code in your .htaccess file to achieve what you want. RewriteEngine On RewriteRule ^\.html$ /articles/author/persons-name [L]
If you have access to the wp-config.php on the server, you can add the following constants that will override the database. This does not save the settings but will at least get you viewing the site again. define( ‘WP_SITEURL’, ‘url_to_wordpress_core_files’ ); define( ‘WP_HOME’, ‘url_to_wordpress_front_end’ ); There is also a RELOCATE constant that will make the … Read more
Slugs should be unique for each content type as they are a unique identifier of the content on the url side. To overcome this limitation you can simply create two costume taxonomies one for wheels and one for brakes and have a mercedes in both of them.