WordPress Navigation

You should hook it like this : function customwidget_init() { $args = array( ‘name’ => __( ‘Main Navigation’, ‘theme_text_domain’ ), ‘id’ => ‘sidebar-navigation’, ‘description’ => ‘Main Navigation Container’, ‘class’ => ”, ‘before_widget’ => ‘<div>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h2 class=”widgettitle”>’, ‘after_title’ => ‘</h2>’ ); register_sidebar( $args ); } add_action( ‘widgets_init’, ‘customwidget_init’); see Codex description

Tabbed navigation in widget backend

I checked the markup and core WordPress code to find out how it handles categories and came to the conclusion that all the categories are get loaded on page load and at a time either All Categories or Most Used is displayed by manipulating it using jQuery(on mouse click showing and hiding category-pop & category-all … Read more

Undefined offset: 2

You will have those notices, if either of those $pages indexes are not set. Check for the existence of the key before trying to use it. if (isset($pages[$current-1])) $prevID = $pages[$current-1]; if (isset($pages[$current+1])) $nextID = $pages[$current+1]; Or something along these lines … $prevID = (isset($pages[$current-1])) ? $pages[$current-1] : ”; $nextID = (isset($pages[$current+1])) ? $pages[$current+1] : … Read more

Walker for menus

All of the methods are being overridden when you load your own walker, but typically you would extend another Walker which works a bit like “filtering” or “pluggable functions”. Take a look at this very simple walker from another question: class my_extended_walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth = 0, $args = array()) { $output … Read more