RtThemesSupport

rt6-custom-rightsidebar-template

May 22nd, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.71 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Custom Right Sidebar
  4. */
  5. get_header();
  6. $this_is_page=true;
  7. ?>
  8.         <!-- sub page header-->
  9.         <div id="sub_page_header">
  10.             <div class="left"> 
  11.             <!-- Page navigation-->
  12.                 <div id="sub_nav">
  13.                     <!-- [rt-breadcrumb] -->
  14.                         <?php  rt_breadcrumb(); ?>
  15.                     <!--/ [rt-breadcrumb] -->
  16.                 </div>
  17.             <!-- /Page navigation-->
  18.             </div>
  19.             <div class="right"></div>
  20.         </div>
  21.         <!-- /sub page header-->
  22.  
  23.         <div class="sub_page">
  24.             <!-- page left -->
  25.             <div class="page_left content">
  26.  
  27.  
  28.             <h1><?php the_title(); ?></h1>
  29.  
  30.             <?php if (have_posts()) : while (have_posts()) : the_post();
  31.  
  32.                 $current_post=$post->ID;
  33.             ?>
  34.             <?php the_content(); ?>
  35.  
  36.             <?php endwhile; else: ?>
  37.                 <p>Sorry, no posts matched your criteria.</p>
  38.             <?php endif; ?>
  39.            
  40.             <div class="emptyspace"></div>
  41.             </div>
  42.         <!--/ Page Left-->
  43.             <!-- page right-->
  44.             <div class="page_right">
  45.                 <?php
  46.                     /*
  47.                     * displaying sup pages
  48.                     */
  49.                     $children = wp_list_pages("title_li=&child_of=".$current_post."&echo=0&depth=1");
  50.                     if ($children) {
  51.                 ?>
  52.                 <!-- sub link-->
  53.                 <div class="box middle">
  54.                     <ul id="sub_menu">
  55.                              <?php echo $children; ?>
  56.                     </ul>          
  57.                 </div>
  58.                 <!-- /sub link-->
  59.                 <?php
  60.                     }
  61.                 ?>
  62.                  <?php
  63.                      if (function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar For Pages'));
  64.                      if (function_exists('dynamic_sidebar') && dynamic_sidebar('Common Sidebar'));
  65.                      include(TEMPLATEPATH."/sidebar.php");
  66.                   ?>
  67.  
  68.             </div>
  69.             <!-- page right-->
  70.  
  71.         <div class="clear_space_h"></div>
  72.         </div>
  73.     </div>
  74.     </div>
  75.     <div class="clear_space"></div>
  76. </div>
  77. <!-- / containers  -->
  78. <?php get_footer();
  79. ?>
Advertisement
Add Comment
Please, Sign In to add comment