Advertisement
vneal

Highlighting post

Feb 27th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.79 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="newsPage">
  3.  <div id="leftColumn">
  4.                        
  5. <?php the_post(); ?>
  6. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7.                                         <h1 class="entry-title floatLeft"><?php the_title(); ?></h1>
  8.                                         <p class="floatRight"><a href="javascript:history.go(-1)">&lt; Back</a></p>
  9.                                         <div class="clearBoth"></div>
  10.                                        
  11.                                         <div class="entry-meta">
  12.                                                 <span class="meta-prep meta-prep-author"><?php _e('By ', 'template_directory'); ?></span>
  13.                                                 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_link( false, $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'template_directory' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
  14.                                                 <span class="meta-sep"> | </span>
  15.                                                 <span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'template_directory'); ?></span>
  16.                                                 <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span>
  17.                                                 <?php edit_post_link( __( 'Edit', 'template_directory' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>                                              
  18.                                         </div><!-- .entry-meta -->
  19.                                        
  20.                                         <div class="entry-content">
  21. <?php
  22. $thumbnail_id=get_the_post_thumbnail($post->ID, 'large');
  23. preg_match ('/src="(.*)" class/',$thumbnail_id,$link);
  24. $title = get_the_title();
  25. ?>
  26. <a href="<?php echo $link[1]; ?>" rel="lightbox" title="<?php echo $title; ?>"><?php the_post_thumbnail('category-thumb'); ?></a>
  27.  
  28. <?php the_content(); ?>
  29.  
  30. <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'template_directory' ) . '&after=</div>') ?>
  31.                                         </div><!-- .entry-content -->
  32.                                        
  33.                                         <div class="entry-utility">
  34.                                         <p><?php printf( __( 'This entry was posted in %1$s%2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'template_directory' ),
  35.                                                 get_the_category_list(', '),
  36.                                                 get_the_tag_list( __( ' and tagged ', 'template_directory' ), ', ', '' ),
  37.                                                 get_permalink(),
  38.                                                 the_title_attribute('echo=0'),
  39.                                                 comments_rss() ) ?>
  40.  
  41. <?php if ( ('open' == $post->comment_status) && ('open' == $post->ping_status) ) : // Comments and trackbacks open ?>
  42.                                                 <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'template_directory' ), get_trackback_url() ) ?>
  43. <?php elseif ( !('open' == $post->comment_status) && ('open' == $post->ping_status) ) : // Only trackbacks open ?>
  44.                                                 <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'template_directory' ), get_trackback_url() ) ?>
  45. <?php elseif ( ('open' == $post->comment_status) && !('open' == $post->ping_status) ) : // Only comments open ?>
  46.                                                 <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'template_directory' ) ?>
  47. <?php elseif ( !('open' == $post->comment_status) && !('open' == $post->ping_status) ) : // Comments and trackbacks closed ?>
  48.                                                 <?php _e( 'Both comments and trackbacks are currently closed.', 'template_directory' ) ?>
  49. <?php endif; ?>
  50. <?php edit_post_link( __( 'Edit', 'template_directory' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ) ?></p>
  51.                                         </div><!-- .entry-utility -->                                                                                                  
  52.                                 </div><!-- #post-<?php the_ID(); ?> -->                
  53.                                 <div class="clearBoth"></div>
  54.                                                                  
  55.  
  56. <?php comments_template('', true); ?>
  57. <div id="nav-below" class="navigation">
  58.                                         <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">&laquo;</span> %title' ) ?></div>
  59.                                         <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">&raquo;</span>' ) ?></div>
  60.                                         <div class="clearBoth"></div>
  61.                                 </div><!-- #nav-below -->    
  62.              
  63.                         </div>
  64.                        
  65. <div id="rightColumn">
  66.  
  67. <div id="archiveListPanel">
  68.   <h2><a href="/category/latest-news/">Latest News</a></h2>
  69.   <ul>
  70.     <?php
  71.  
  72. $IDOutsideLoop = $post->ID;
  73. global $post;
  74.  
  75. $myposts = get_posts( array ( 'category_name' => 'Latest News', 'posts_per_page' => -1 ) );
  76. foreach($myposts as $post) :
  77. ?>
  78.     <li <?php if(is_single() && $IDOutsideLoop == $post->ID) print 'class="currentPost"' ?>><a href="<?php the_permalink(); ?>">
  79.       <?php the_title(); ?>
  80.       </a></li>
  81.     <?php endforeach; ?>
  82.   </ul>
  83.   </div>
  84.  
  85. <div id="newsArchivePanel">
  86.   <h2><a href="/category/archive/">News Archive</a></h2>
  87.   <ul>
  88.    <?php
  89.  
  90. $IDOutsideLoop = $post->ID;
  91. global $post;
  92.  
  93. $myposts = get_posts( array ( 'category_name' => 'Archive', 'posts_per_page' => -1 ) );
  94. foreach($myposts as $post) :
  95. ?>
  96.     <li <?php if(is_single() && $IDOutsideLoop == $post->ID) print 'class="currentPost"' ?>><a href="<?php the_permalink(); ?>">
  97.       <?php the_title(); ?>
  98.       </a></li>
  99.     <?php endforeach; ?>
  100.   </ul>
  101. </div>
  102.  
  103.  
  104.  
  105. </div>  
  106.              
  107. </div>
  108. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement