How would I make a function to dynamically determine if user is logged to change navigation menu text?

I’m not really sure what you’re trying to achieve with the is_page parts – maybe I’m missing something – but what if you’d just write: if (is_user_logged_in()) { $my_account = “My Account”; echo ($my_account); } else { $login = “Login/Sign Up”; echo ($login); } return just returns the variables for use in your code, echo … Read more

Drop down menus with wp_nav_menu or wp_page_menu

“If one isn’t filled out, wp_nav_menu falls back to wp_page_menu…” Means, if you do not create a nav menu from the Menus section in the back end, then as a fall back, wp_page_menu will be used (Check the fallback parameter for wp_nav_menu, it is set to wp_page_menu by default). It completely depends on how you … Read more

Understanding with this WordPress code

wp_nav_menu() is a template tag – that is function designed to be called in theme template file to output something. This specific function generates and displays output of navigation menu. Arguments, you are asking about, determine that menu displayed should be looked up by “Main Menu” name and output should not be wrapped in div … Read more

Missing current_page_item in custom menu

The current-item CSS class generated by wp_nav_menu() is .current-menu-item. However, wp_nav_menu() also has backward-compatibility with wp_page_menu()/wp_list_pages(), and does output .current_page_item (if the current context is a page post-type, of course). So, a couple of possibilities: The current context is not a static Page You’re using a custom walker for the wp_nav_menu() output, that doesn’t output … Read more

Most allowed Taxonomies in Appearance->Menus

Whilst the menu system is great, it is a little intensive; 300 is obviously pushing it. Would a code snippet not be the way to go? <ul class=”places”> <?php wp_list_categories( ‘taxonomy=places&title_li=’ ) ?> </ul>

Dropdown primary navigation menu not working

Without seeing your code it’s hard to say what you should do to fix it. The code you’ve supplied is the html output not the PHP code right? Take a look at one of my previous answers. Make sure you use the Updated for Edited For WordPress 3.3 Compatibility section of the answer. If you’re … Read more