Show or hide custom menu widget in side bar conditionally
I have been trying and searching to accomplish this. I have the “custom menu” widgets “Members Area”, “Admin Area” in side bar, assigned menus to them. Fine, they display.
I want to show “Admin Area” widget only when the current user is admin. I believe it has something to do with adding a filter to “sidebars_widgets”. Honestly, i do not have a clue to target the “Admin Area” widget. How do I handle this ?