%PDF- %PDF-
Direktori : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/ |
Current File : /var/www/pn/beta/64801_wp-content/themes/intosai/templates/sections/navigation_thirdlevel.php |
<?php /* CHECK IF CURRENT PAGE HAS CHILDREN */ //$page_ID = get_the_ID(); //Current pages ID if($post->post_parent){ // Check if current page has a parent. And get that ID. /*$ancestors = get_post_ancestors($post->ID); $parent = $ancestors[count($ancestors) - 1]; if(count($ancestors) == 1){ $top_ancestor = $ancestors[0]; //SECOND LEVEL $children = get_pages("depth=0&child_of=" . $page_ID); }else{ $top_ancestor = $ancestors[1]; //THIRD LEVEL $secLvlAncestor = $ancestors[0]; //SECOND LEVEL $children = get_pages("depth=0&child_of=" . $secLvlAncestor); }*/ ?> <div class="wrapper"> <nav id="third_level_menu"> <!--ul class="nav_third_level"> <?php /* foreach($children as $child){ if($child->post_parent != $top_ancestor){ if($page_ID == $child->ID){ $current = 'class="current-menu-item"'; }else{ $current = ''; } ?> <li <?php echo $current; ?>> <a href="<?php echo get_permalink($child->ID); ?>"> <?php echo $child->post_title; ?> </a> </li> <?php } ?> <?php } */?> </ul--> <?php wp_nav_menu(['theme_location' => 'mainNav', 'container' => '', 'menu_class' => 'nav_third_level']); ?> </nav> </div> <?php } ?>