Strict Standards Error bootstrap navwalker

It means that the declaration of the start_lvl method in wp_bootstrap_navwalker should match the declaration of the method in Walker_Nav_Menu. It doesn’t. function start_lvl( &$output, $depth ) { VS. function start_lvl( &$output, $depth = 0, $args = array() ) { Make the arguments match exactly and you should be fine. And you should probably not … Read more

Customize Walker_nav_menu to show posts if item is category

You could either extend the Walker_Nav_Menu walker class (i.e., the start_el function is sufficient, as already mentioned). Or you could hook in when the original output (i.e., the category) has been created. That would be the walker_nav_menu_start_el hook. For instance like so: function wpdev_139801_start_el( $item_output, $item ) { if ( isset( $item->object ) && $item->object … Read more

Help with output of post classes using apply_filters

Solved it with generous help using join()… function start_el(&$output, $page, $depth = 0, $args = array(), $id = 0) { if ( $depth ) $indent = str_repeat(“\t”, $depth); else $indent=””; extract($args, EXTR_SKIP); $output .= $indent . ‘<li id=”item_’.$page->ID.'” class=”‘.join( ” “, get_post_class( “”, $page->ID )).'”><span>’.apply_filters( ‘the_title’, $page->post_title, $page->ID ).'</span>’; }

Horizontal Navigation

You could use conditional statements to show the children. Depending on what your using to categorize the pages… If you were using parent / children categories it would work something like this: <?php if ( in_category( ‘New Watches’ )) { // show new watches menu } elseif ( in_category( array( ‘Classic Watches’ ) )) { … Read more

Add dynamic content block to nav section generated by custom walker

At the end of your Navigation Walker you can just append to the $output like so: $output .= apply_filters( ‘walker_nav_menu_start_el’ , $item_output , $item , $depth , $args ); // This is before the ending list item: $output .= ‘<span>Inner Navigational Text</span>’; To get the post meta (I’m not familiar with ACF) you can use … Read more