Want to be able to redirect readers to another wordpress site but still be able to access the back end of current site

You can do it with the “template_redirect” hook. For multisite or simple WordPress. e.g: add_action(‘template_redirect’, function(){ $user = wp_get_current_user(); $userRoles = $user->roles; $url = site_url(); if(!in_array(‘administrator’, $userRoles) && !is_front_page()){ wp_redirect($url); exit; } }); EDIT is_front_page() will work only if “Front page displays” is set. Use is_home() if not. EDIT #2 Accordind with our discuss below, … Read more

Wildcard multisite wp-admin url wrongfully redirected

Take a look at your wp-config.php file. For a subdomain installation, you should have something like this: define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘rareteas.com’); define(‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/”); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); If you have SUBDOMAIN_INSTALL set to false, change it to true, which is necessary for a subdomain multisite. Next, take a look at your database. Sometimes … Read more

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş