Advertisement
Guest User

Untitled

a guest
Apr 14th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <!-- sidebar -->
  2. <aside class="sidebar menu_box" role="">
  3.  
  4. <div class='menu_box'><div class='h_box'><?php
  5. global $wp_query;
  6. if ( empty($wp_query->post->post_parent) )
  7. {
  8. the_title();
  9. ?></div><div class="p_box"><?php
  10. wp_list_pages("title_li=&child_of=".$post->ID);
  11. ?></div></div><?php
  12.  
  13. } else {
  14. ?><div class="menu_box"><div class="h_box"><?php
  15.  
  16. if($post->post_parent) {
  17. $id = $post->post_parent;
  18. $zm_parent_permalink = get_permalink($id);
  19. ?>
  20. <a href="<?php echo get_permalink($id) ?>"><?php echo get_the_title($id); ?></a>
  21. <?php } ?>
  22. </div>
  23. <div class="p_box">
  24. <?php wp_list_pages("title_li=&child_of=".$post->post_parent);
  25. ?>
  26. </div></div>
  27. <?php } ?>
  28.  
  29.  
  30.  
  31. <div class="sidebar-widget sidebox">
  32. <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar('widget-area-1')) ?>
  33. </div>
  34.  
  35. <div class="sidebar-widget sidebox">
  36. <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar('widget-area-2')) ?>
  37. </div>
  38. </aside>
  39. <!-- /sidebar -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement