Guest User

Untitled

a guest
Jul 15th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Corps Highlights
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8.  
  9. <ul id="breadcrumb">
  10.  
  11. <h2>
  12.  
  13. <?php if($post->post_parent){ ?>
  14.  
  15. <li><?php wp_list_pages('title_li=&include='.$post->post_parent.''); ?>&nbsp;&middot; <span><?php the_title(); ?></span></li>
  16.  
  17. <?php } else { ?>
  18.  
  19. <li><?php the_title(); ?></li>
  20.  
  21. <?php } ?>
  22. </h2>
  23.  
  24. </ul>
  25.  
  26. <div id="left_col">
  27.  
  28. <?php
  29. if($post->post_parent)
  30. $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  31. else
  32. $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  33. if ($children) { ?>
  34.  
  35. <ul>
  36.  
  37. <?php echo $children; ?>
  38.  
  39. </ul>
  40.  
  41. <?php } ?>
  42.  
  43. <div id="quotetop"></div>
  44.  
  45. <?php
  46. $rand_posts = get_posts('category_name=quotes&orderby=rand&numberposts=1');
  47. foreach( $rand_posts as $post ) :
  48. setup_postdata($post);
  49. ?>
  50.  
  51. <blockquote id="random_quote">
  52.  
  53. <?php the_content(); ?>
  54.  
  55. <div id="bottom"></div>
  56.  
  57. </blockquote>
  58.  
  59. <cite id="sidebarcite"><?php echo get_post_meta($post->ID, "cite", true);?></cite>
  60. <?php endforeach; ?>
  61. </div>
  62.  
  63. <!--....................................................................
  64. ....................................................................-->
  65.  
  66. <div id="pagecontent">
  67.  
  68. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  69.  
  70. query_posts('category_name=highlights&paged=$paged'); ?>
  71.  
  72. <?php
  73.  
  74. if (have_posts()) :
  75.  
  76. while (have_posts()) : the_post();
  77.  
  78. ?>
  79.  
  80. <div class="entry">
  81.  
  82. <h3 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  83.  
  84. <span class="date"><?php the_time('F, Y'); ?></span>
  85.  
  86. <?php the_content(); ?>
  87.  
  88. </div>
  89.  
  90. <?php endwhile; ?>
  91.  
  92. <?php next_posts_link('&laquo; Older Entries') ?>
  93.  
  94. <?php previous_posts_link('Newer Entries &raquo;') ?>
  95.  
  96. <?php endif; ?>
  97.  
  98. </div>
  99.  
  100. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment