Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: None  |  size: 0.66 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.     $children = wp_list_pages('title_li=&child_of=2&echo=0&depth=1&link_before=<i class="icon-chevron-right"></i>');
  3.     if ($children) { ?>
  4.     <div class="side-nav-box">
  5.         <?php if ($children) { ?>
  6.                  
  7.           <h4>Subpages</h4>
  8.                         <ul id="side-nav-list">
  9.                                 <?php echo $children; ?>
  10.                         </ul>
  11.                   <?php } ?>
  12.  
  13.                 <?php
  14.                 $parent = get_the_title($post->post_parent);
  15.                 if  (is_page() && $post->post_parent ) { ?>
  16.                 Go back to:<br/> <i class="icon-arrow-left"></i>&nbsp;&nbsp;<a class="parentpage-list" href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent;?></a>
  17.                 <?php } ?>
  18.      </div>
  19. <?php } ?>
  20. <!-- /side-nav-box -->