How to switch subdomain with root domain and redirect traffic?

You can redirect all old inner pages to the new ones using .htaccess with HTTP header 301, but remember not to duplicate on the new site these parts of old URLs which goes after the old domain name (like /new-page-1/ in the example below). RewriteEngine On Redirect 301 /old-page-1/ httр://sub.domain.tld/new-page-1/ Redirect 301 /old-page-2/ httр://sub.domain.tld/new-page-2/ You … Read more

switch combined with if statement

You do not need to use pass the $value in a switch statement, Just pass there $user->roles[0] instead of $value and after that your condition. Add below code and let me know your answer towards it. add_action( ‘um_members_just_after_name’, ‘my_members_after_user_name’, 10, 1 ); function my_members_after_user_name( $user_id ) { $user = new WP_User( $user_id ); /* if( … Read more