Advertisement
deliciousthemes

Format.php

Mar 22nd, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.15 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying posts in the Standard post format.
  4.  *
  5.  * @package WordPress
  6.  * @subpackage Delicious
  7.  *
  8.  */
  9.  
  10.     $time = get_the_time(get_option('date_format'));
  11.    
  12.     $standard_post_data = get_post_meta($post->ID,'dt_standard_select',true);
  13. ?>
  14.  
  15. <article id="post-<?php the_ID(); ?>" <?php post_class('post post-masonry'); ?>>
  16.  
  17.     <?php
  18.         $thumb_id = get_post_thumbnail_id($post->ID);
  19.         $image_url = wp_get_attachment_url($thumb_id);     
  20.        
  21.         if ( has_post_thumbnail() ) {
  22.             if(is_single()) {
  23.                 ?>
  24.                 <div class="post-thumbnail">
  25.                     <a href="<?php echo $image_url; ?>" rel="prettyPhoto" title="<?php the_title(); ?>">
  26.                         <span class="item-on-hover"><span class="hover-link"><i class="fa fa-search"></i></span></span>
  27.                         <?php the_post_thumbnail('blog-thumb'); ?>
  28.                     </a>
  29.                 </div><!--end post-thumbnail-->    
  30.             <?php
  31.             }
  32.             else
  33.             { ?>
  34.                 <div class="post-thumbnail">
  35.                     <a href="<?php the_permalink(); ?>">
  36.                         <span class="item-on-hover"><span class="hover-link"><i class="fa fa-external-link"></i></span></span>
  37.                         <?php the_post_thumbnail('blog-thumb'); ?>
  38.                     </a>
  39.                 </div><!--end post-thumbnail-->    
  40.                 <?php
  41.             }
  42.         }  ?>
  43.  
  44.     <div class="post-content">
  45.         <h1 class="masonry-title">
  46.             <?php if(!is_single()) { ?>
  47.             <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  48.             <?php } else { the_title(); } ?>
  49.  
  50.         </h1>
  51.         <span class="post-meta">
  52.         <i class="for-sticky fa fa-exclamation"></i><i class="fa fa-pencil"></i>
  53.         <?php
  54.             echo '<em>' . $time. '</em>';
  55.            
  56.             if(is_single()) {
  57.                 echo '<em>' . get_the_category_list( __( ', ', 'delicious' ) ) . '</em>';
  58.                 comments_popup_link(__('No Comments', 'delicious'), __('1 Comment', 'delicious'), __('% Comments', 'delicious'));
  59.             }
  60.         ?>
  61.         </span>        
  62.         <div class="clear"></div>
  63.    
  64.         <?php  
  65.             global $more;
  66.             if(!is_single()) { $more = 0; }
  67.             the_content(__('Read More', 'delicious')); ?>
  68.            
  69.             <?php wp_link_pages('before=<div class="page-links">Pages: &after=</div>'); ?>
  70.     </div><!--end post-content-->
  71.    
  72. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement