0

I just wanted to know whether it's possible or not to create a website for example newwebsite.com and create two wp-admins each with different URLs for example one with newwebsite.com/wp-admin and one as newwebsite.com/dashboard or something like that or will I need to have another sub domain registered for that.

My Aim - What my is actually is that I wanted to create a website where other users could do certain things on my website like writing posts but and creating projects and showing them on my website for which they would be using the newwebsite.com/dashboard.

3
  • 1
    OK... And why should that be another dashboard? Why can't they use the same wp-admin as you? Commented Feb 6, 2019 at 15:55
  • Look into user roles. Allow certain capabilities to specific roles and deny others.
    – jdm2112
    Commented Feb 6, 2019 at 16:13
  • I wanted to know whether I could just build a custom dashboard for my clients and a dashboard for admin too. Commented Feb 7, 2019 at 2:56

1 Answer 1

2

While it looks like what you're trying to do could be accomplished with user roles (and add_cap() if you're looking to be more specific with roles), if you still really want to make a different dashboard, you can build one.

I recently built a site that was has a custom dashboard for the end users. It can provide a great user experience, but it takes a lot of work to get going.

To get you started, you would need to redirect non-admins away from the wp_admin by adding this to your functions.php

if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    wp_redirect( home_url() . '/wp-login.php' );
    exit;
};

And a similar redirect function on whatever page you are using for your dashboard

if (!(is_user_logged_in())){
    wp_redirect( home_url()  . '/wp-login.php'  );
    exit;
};

That way, anyone with a login can access "/dashboard', but only admins can access '/wp-admin'.

If this is the road you're looking to take, you should understand that it can take weeks to months of development to get a consumer ready dashboard built out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.