$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>How to disable admin access on new site registration for user in Multisite?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to disable admin access on new site registration for user in Multisite?

matteradmin9PV0评论

I have a scenario where i have to implement custom dashboard which should have nothing to do with wordpress backend instead it is intended for business purposes. A user signs up on the main website for sub domain and on registration he is supposed to be taken to my custom dashboard. However, the user should not be able to access wordpress admin dashboard. Currently i am not sure where to make necessary editing, so i haven't done anything in that regard. Is there a way to do it using wordpress built in functionalities?

I have a scenario where i have to implement custom dashboard which should have nothing to do with wordpress backend instead it is intended for business purposes. A user signs up on the main website for sub domain and on registration he is supposed to be taken to my custom dashboard. However, the user should not be able to access wordpress admin dashboard. Currently i am not sure where to make necessary editing, so i haven't done anything in that regard. Is there a way to do it using wordpress built in functionalities?

Share Improve this question edited Dec 4, 2018 at 9:52 Abdullah Khan asked Dec 3, 2018 at 22:54 Abdullah KhanAbdullah Khan 1011 bronze badge 1
  • Which parts of this have you implemented, and which parts are you unsure of? it's not clear if you already have code that redirects the user on registration or not. What have you tried so far? Can you edit your question to include any code you're currently using? Or if you have none to state that you have none? – Tom J Nowell Commented Dec 3, 2018 at 23:04
Add a comment  | 

1 Answer 1

Reset to default 0

Try

function admin_default_page() {
return '/new-dashboard-url';
}

add_filter('login_redirect', 'admin_default_page'); 
Post a comment

comment list (0)

  1. No comments so far