custom-function.php - 隐藏导航栏

I'm trying to hide a secondary navbar if a user is logged out using a plugin called private content on a wordpress site. I can hide content on pages and menu items with this plugin , but all of the links in my secondary navbar are private , when you login they appear.

That's all good but when you are not logged-in the menu bar DIV still shows , just empty. Out of the box the plugin cannot do this, but the plugin has some code to hide items from non-logged in users and i would like to use that to hide the #navbar-2-wrap when they are not logged in.

I have this from the developer -

if(pg_user_logged() != false) {
      // display contents
}

can anyone get me on the right track to create a custom-function to hide my #navbar-2-wrap using some CSS set to display:none for the DIV #navbar-2-wrap within that function?

obviously i need the bit to replace // display contents , maybe an inline style to collapse the div ?

any pointers appreciated :)

Implementing jQuery might be your best approach. If the user is logged out hide the div using jQuery API.

jQuery Hide Effect