Support » Plugins » [Plugin: Widget Logic] Admin only widgets?

  • Is there a way of using the Widget Logic plugin to show a widget only for admin level users…

Viewing 4 replies - 1 through 4 (of 4 total)
  • you could use current_user_can(‘capability’)

    i think capability can be an old fashioned admin level type integer or the more modern capabilities. have a look at

    I don’t see how…

    The roles and capabilities seems to relate more to the admin panel and editing, not viewing pages..

    It must be possible somehow….

    nonetheless, the current_user_can function should work when displaying pages and posts. current_user means the logged in ID.

    i have used it to show extra post information viewable only by logged in site editors.

    try it. make an admin and non-admin user, and just try adding some widget logic that uses that function.

    wow! it works….

    had a look here

    then just added current_user_can(‘level_10’) and it works…..

    Thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Widget Logic] Admin only widgets?’ is closed to new replies.