Menu for specific user

Actually I think you need to hide or show the menu items based on “User Role”. So here a possible solution would be creating menus for each roles and showing them by condition based on “User Role”. Here is the code- function the_dramatist_menu_change( $args=”” ) { $current_user = wp_get_current_user(); if( in_array(‘your-user-role’, $current_user->roles) ) { $args[‘menu’] … Read more

Pulling a variable into the wp_nav_menu function

I think your scope is not the same. You are defining the $menu_name in one scope and calling it in another scope. So you can do it with global variable like below- $GLOBALS[ ‘menu_name’ ] = ‘Section 1 Menu’; And call it like- <div id=”nav”> <div class=”close-menu”></div> <?php wp_nav_menu( array( ‘menu’ => $GLOBALS[ ‘menu_name’ ], … Read more

Menus not visible in Appearance after being registered

There’s nothing wrong with your theme_setup() function in your functions.php file. The error you get simply points out the fact that the menu name Main Menu already exists. In other to resolve this you should replace your Main Menu menu name definitions in your functions.php file with something other than what it currently is. It’s … Read more

WordPress fountainpress header is covering top bar

It is a conflict between your theme’s css and the admin header. Options are to modify your theme’s css, or remove the admin bar. To remove your admin bar add this to your theme’s functions.php file: add_filter(‘show_admin_bar’, ‘__return_false’);

How to add content to the menu

Use Appearance, Menus in the Admin area to add menu items; create a menu first if not already there. Then assign the menu to the site via the Manage Locations tab on the same screen. Depending on the theme you use, you’ll be able to assign your menu so it appears where allowed by the … Read more