• Resolved pgDarkness

    (@pgdarkness)


    How do I completely disable front-end publisher of this plugin?
    I like to force vendors to admin dashboard only.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @pgdarkness, in order to add this flow, you need to direct the vendor to the backend of the site, whenever they need to access the dashboard page.

    If you need reference of the coding procedure, let us know.

    Thread Starter pgDarkness

    (@pgdarkness)

    I think I got it, I need to make a redirection like this: Right?
    https://mywebsite/dashboard/ -> https://mywebsite/wp-admin/
    Assuming the first part is the link of vendors front-end dashboard.

    • This reply was modified 5 years, 2 months ago by pgDarkness.
    • This reply was modified 5 years, 2 months ago by pgDarkness.

    @pgdarkness, kindly follow this code snippet :

    add_action( 'template_redirect', 'restrict_user_to_access_vendor_dashboard' );
    function restrict_user_to_access_vendor_dashboard() {
    global $post;
    if($post->post_name == 'dashboard') {
    $url = home_url().'/wp-admin';
    wp_redirect($url);
    exit;
    }
    }
    Thread Starter pgDarkness

    (@pgdarkness)

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Frontend’ is closed to new replies.