Filter WordPress menu

// Filter wp_nav_menu() to add additional links and other output function new_nav_menu_items($items) { // gets passed a string of <li>’s $homelink = ‘<li><a href=”‘ . home_url( ‘/’ ) . ‘”>’ . __(‘Home’) . ‘</a></li>’; $items = $homelink . $items; return $items; } add_filter( ‘wp_nav_menu_items’, ‘new_nav_menu_items’ ); Another Example function new_nav_menu_items($items) { $cat_menu_list = wp_list_categories( ‘echo=0&title_li=&child_of=124′
Continue reading: Filter WordPress menu

List all hooked functions

10. List All Hooked Functions The problem. When things go wrong, listing all hooked functions can be very useful for debugging. The solution. As with the others, this code has to be pasted in your functions.php file. When you have finished debugging, don’t forget to remove the code from functions.php, or else the debugging message
Continue reading: List all hooked functions