Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2012
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php $args = array(
  2. 'child_of' => 0,
  3. 'hierarchical' => 0
  4. );
  5. ?>
  6.  
  7. <?php $sitemap_pages = get_pages( $args ); ?>
  8. <?php
  9. // etc...
  10. //loop through the array so we can best utilize the modulus for layout.
  11. foreach($sitemap_pages as $value){
  12.  
  13. if($value->post_parent){}else{
  14. //echo the container and it's children, if any
  15. $link_string = seov_parent_child($value->ID,'class_name');
  16. //only create a container if something exists
  17. if(!empty($link_string)){
  18. echo '<div class="Main_Container">';
  19. echo $link_string;
  20. echo '</div>';
  21. }//end if not empty string
  22. }//end foreach
  23. }
  24. ?>
  25.  
  26. <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement