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 ?

, Srikanth Seshachalam 2 years 2020-01-06T08:39:15-05:00 0 Answers 96 views 0

Leave an answer