Show Child of Parent Page including all other parents

‘depth’=>-1 will show all the levels (source^): $depth (integer) (optional) How many levels of the hierarchy are to be included where 0 means all. -1 displays links at any depth and arranges them in a single, flat list. Default: 0 So your code will be: <?php if (has_nav_menu( ‘secondary’ )) { wp_nav_menu( array( ‘container’ => … Read more

Calling the first & last post by category in custom post type

It is sometimes irritating that some build-in functions don’t have appropriate filters to modify their output. get_boundary_post() is one of those build-in functions. Unfortunately it does not get posts according to post type, only taxonomy. You can still however make use of this function to get the first and last post. It does support the … Read more

WP Super Large Menu Problem

From first view this seems to be tough job, but actually even I having small skills of php could solve this problem just adding following code to my custom walker class: if ( $depth == 1 ) { // remove this statement if depth check is not required if (wp_get_nav_menu_object($item->title)) {// checking if item name … Read more

wp_nav_menu not selecting teh correct menu

I faced the same issue and finally got the answer: For functions.php: register_nav_menu( ‘primary’, __( ‘Navigation Menu’, ‘Removemymug_Theme’ ) ); register_nav_menu( ‘second-menu’, __( ‘Second Menu’, ‘Removemymug_Theme’ ) ); For Secondary Menu (Footer): wp_nav_menu( array( ‘menu’ => ‘second-menu’, ‘theme_location’ => ‘second-menu’, ‘depth’ => 2, ‘container’ => ‘div’, ‘container_class’ => ‘navbar-collapse collapse’, ‘menu_class’ => ‘nav navbar-nav navbar-right’, … Read more