How To Change the URL of a WordPress Multisite

These are the .htacess rules that fixed it. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] #RewriteRule ^(.+)?/(wp-.*) /$2 [L] RewriteRule ^(.*?)/(wp-.*) /$2 [L] RewriteRule . index.php [L]

Using permalinks with parameters

id is already used by WordPress, it’s a query variable and a reserved name. If you put ?id=5 on the end of a URL, you’re asking for the post with ID 5. Instead, have you considered using a person post type? This would give you an archive, add/edit screen, admin listings, templates, individual person templates, … Read more

Using URL variables on a custom WP_Query

WordPress doesn’t handle this logic qutomatically so you will have do do it manually. What you need to do is: Read the url parameter with get_query_var( ‘category_name’ ); injects it in your custom WP_Query: $custom_query_args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘post_format’, ‘field’ => ‘slug’, ‘terms’ => … Read more

Create a dynamic buddupress tab

You can’t use an object variable, $user->display_name, in a string. And why would you want a tab that links back to the member being viewed? You’re already viewing that member. This will provide the url of the displayed member: bp_displayed_user_domain() So you could do this: function redirect_user_to_tab3(){ bp_core_redirect( bp_displayed_user_domain() ); } If you just want … Read more