__( 'Header Menu' ), 'header-sub-menu' => __( 'Header Sub-menu' ) ) ); } add_action( 'init', 'register_my_menus' ); function yakidoo_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'theme-slug' ), 'id' => 'sidebar-1', 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'yakidoo_widgets_init' ); class Yakidoo_Walker extends Walker { // Tell Walker where to inherit it's parent and id values var $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' ); /** * At the start of each element, output a
  • and tag structure. * * Note: Menu objects include url and title properties, so we will use those. */ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $output .= sprintf( "\n
  • %s
  • \n", $item->url, ( $item->object_id === get_the_ID() ) ? ' class="current"' : '', $item->title ); } } ?>