Adding an additional menu in WordPress

b-grader First, you should you this format to add menu location (in your function.php) add_action(‘init’, ‘register_top_menu’); function register_top_menu() { register_nav_menu(‘top_menu’, __(‘Top Menu’, ‘your_text_domain’)); register_nav_menu(‘bottom_menu’, __(‘Bottom Menu’, ‘your_text_domain’)); } (note: ‘your_text_domain’ is used for translation..) Then in the place you want the menu to apear.. <?php wp_nav_menu( array( ‘theme_location’ => ‘primary-menu’ ) ); ?> so… if … Read more

Custom menus not showing

it turns out that after copying some code from another post (http://stackoverflow.com/questions/9439877/adding-menu-items-in-wordpress) for a filter in functions.php to add the search bar in the nav menu, when it wasn’t matching the menu, it was returning nothing (i.e erasing the $items) I stupidly copied this code in without testing… and it was the problem all along!

Add jQuery function to media button

Where are you attaching this listener: $(‘#fluffyRabbit’).live(‘click’,function() { alert(‘o hai!’); }); I suppose that if you attach within a $(document).ready(function(){ //attach here $(‘#fluffyRabbit’).live(‘click’,function() { alert(‘o hai!’); }); }; that would do the trick. Is it working for you?

Setting up menus before making a template live

All you need to do is enable custom menu’s by creating a functions.php in your current theme, and or if it already has a functions.php file, you just need to add this: add_theme_support( ‘menus’ ); And you will be able to add menus before making them live.

Adding a unique class to wp_nav_menu

Check out the section titled Adding Conditional Classes to Menu Items on the wp_nav_menu Codex page. This should give you a pretty good overview for adding classes to menu items using the nav_menu_css_class filter. For what you asked to do, which is add menu_element to the class attribute for both the menu item with ID … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)