bdbrown

Reorganize Content.php Layout

May 5th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.28 KB | None | 0 0
  1. <!--
  2. reconfigure content.php
  3. 1. move post title to top
  4. 2. add post byline under title
  5. 3. move post meta data up under byline
  6. 4. display post content instead of excerpt
  7. 5. split post-inner and post-hover so content outside of hover
  8. -->
  9.  
  10. <article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>>   
  11.     <div class="post-inner">
  12.        
  13.         <div class="post-hover">
  14.        
  15.         <h2 class="post-title">
  16.             <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  17.         </h2><!--/.post-title-->
  18.         <p class="post-byline"><?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> &middot; <?php the_time(get_option('date_format')); ?></p>
  19.         <div class="post-meta group">
  20.             <p class="post-category"><?php the_category(' / '); ?></p>
  21.             <p class="post-date"><?php the_time('j M, Y'); ?></p>
  22.         </div><!--/.post-meta-->
  23.         <div class="clear"></div>
  24.  
  25.         <div class="post-thumbnail">
  26.             <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
  27.                 <?php if ( has_post_thumbnail() ): ?>
  28.                     <?php the_post_thumbnail('thumb-medium'); ?>
  29.                 <?php elseif ( ot_get_option('placeholder') != 'off' ): ?>
  30.                     <img src="<?php echo get_template_directory_uri(); ?>/img/thumb-medium.png" alt="<?php the_title(); ?>" />
  31.                 <?php endif; ?>
  32.                 <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?>
  33.                 <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?>
  34.                 <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?>
  35.             </a>
  36.             <?php if ( comments_open() && ( ot_get_option( 'comment-count' ) != 'off' ) ): ?>
  37.                 <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a>
  38.             <?php endif; ?>
  39.         </div><!--/.post-thumbnail-->
  40.        
  41.         </div><!--/.post-hover-->
  42.        
  43.         <!-- change to display full post content instead of excerpt -->
  44.         <!-- <?php if (ot_get_option('excerpt-length') != '0'): ?> -->
  45.         <div class="entry excerpt">            
  46.             <!-- <?php the_excerpt(); ?> -->
  47.             <?php the_content(); ?>
  48.         </div><!--/.entry-->
  49.         <?php endif; ?>
  50.        
  51.     </div><!--/.post-inner-->  
  52. </article><!--/.post-->
Advertisement
Add Comment
Please, Sign In to add comment