• Resolved Phil

    (@rips99)


    Hi there,

    Is it possible to add the ‘Switch Off’ link elsewhere in WordPress?

    I would like our admins to have access to this, but I also want to disable the Top Admin bar.

    Thanks,

    Phil.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Yep! But you’ll need to write a bit of PHP code to do it and add it to the relevant place in your theme or a plugin. You can fetch and display the “Switch Off” URL with the following:

    if ( current_user_can( 'switch_off' ) ) {
    printf(
    '<a href="%s">Switch Off</a>',
    \user_switching::switch_off_url()
    );
    }
    Thread Starter Phil

    (@rips99)

    Thanks, that worked well. Excellent plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.