Display content according to current URL

For this to work, you would have to add a rewrite that rewrites https://example.com/[manufacturer slug]/[brand slug] to index.php with e.g. manufacturer=[manufacturer slug]&brand=[brand slug]. e.g.: add_filter( ‘rewrite_rules_array’,’jf_insert_rewrite_rules’ ); function jf_insert_rewrite_rules( $rules ) { $newrules[‘^(.*)/(.*)/?$’] = ‘index.php?manufacturer=$matches[1]&brand=$matches[2]’; return $newrules + $rules; } Remember to goto permalinks page and hit save for the rewrite rules to be updated. … Read more

Rewrite user profile URL to be human friendly

The first step is to add a query var so WordPress will recognize it and parse its value in rewrite rules. function wpd_query_vars( $query_vars ) { $query_vars[] = ‘users_filter_name’; return $query_vars; } add_filter( ‘query_vars’, ‘wpd_query_vars’ ); Next, add a rewrite rule to capture the requests and set the users_filter_name: function wpd_user_rewrite_rule(){ add_rewrite_rule( ‘^user-profile/([^/]*)/?’, ‘index.php?page_id=31848&users_filter_name=$matches[1]’, ‘top’ … Read more

URL rewriting for WordPress Network (Multisite) subsite

This is straightforward if I understand the question properly. Use the “WordPress MU Domain Mapping” plugin: http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/ Update I think something like the following should work in your .htaccess: RewriteCond %{HTTP_HOST} www.exampleurl.com RewriteCond %{REQUEST_URI} !^/testsite RewriteRule ^(.*)$ testsite/$1 [L] This will return the contents of the folder “testsite” for “www.exampleurl.com”. And if you have: www.exampleurl.com/myoldsite/ … Read more