Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $args = array(
- 'child_of' => 0,
- 'hierarchical' => 0
- );
- ?>
- <?php $sitemap_pages = get_pages( $args ); ?>
- <?php
- // etc...
- //loop through the array so we can best utilize the modulus for layout.
- foreach($sitemap_pages as $value){
- if($value->post_parent){}else{
- //echo the container and it's children, if any
- $link_string = seov_parent_child($value->ID,'class_name');
- //only create a container if something exists
- if(!empty($link_string)){
- echo '<div class="Main_Container">';
- echo $link_string;
- echo '</div>';
- }//end if not empty string
- }//end foreach
- }
- ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement