WP childs menu
<?php $theParent = wp_get_post_parent_id(get_the_ID()); $allPages = get_pages(array( 'child_of' => get_the_ID() )); if ($theParent or $allPages) { ?> <div class="page-links"> <h5><a href="<?php echo get_permalink($theParent); ?>"><?php echo get_the_title($theParent); ?></a></h5> <ul> <?php if ($theParent) { $findChildrenOf = $theParent; } else { $findChildrenOf = get_the_ID(); } wp_list_pages(array( 'title_li' => NULL, 'child_of' => $findChildrenOf, 'sort_column' => 'menu_order' )); ?> </ul> </div> <?php } ?>
Hope this helps and happy coding :)
Zobacz jeszcze
ładny header w HTML5
<!DOCTYPE html> <html lang="pl" class="no-js"> <head> <meta charset="UTF-8"> <title>Website HTML5</title> <meta...