jegtheme

No crop featured blog image

Nov 27th, 2012
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.61 KB | None | 0 0
  1. <?php
  2.     /**
  3.      * Single post template
  4.      * @author Jegbagus
  5.      */
  6.     global $post;
  7.     global $jdata;
  8.    
  9.     // ga pake ini, pake the_post_thumbnail aja
  10.     $imageHeader = j_get_post_header_image ($post, 'full');
  11. ?>
  12. <div id="post-<?php the_ID(); ?>"  <?php post_class(array('blogentry','containerborder')); ?>>
  13.     <div class="inner-container <?php if(has_post_thumbnail()) { echo "headimg" ; } ?>">
  14.         <div class="blog-img">
  15.             <?php if(has_post_thumbnail()) : ?>    
  16.             <a href="<?php the_permalink(); ?>">
  17.                 <img src="<?php echo jeg_get_image($imageHeader['src'], '', '602', ''); ?>"/>              
  18.             </a>
  19.             <?php endif; ?>
  20.            
  21.             <div class="blogtitle  <?php if(has_post_thumbnail()) { echo "headingwithimage" ; } ?>">
  22.                 <?php if(!is_single() && !is_page()) : ?>
  23.                 <h2>
  24.                     <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>          
  25.                 </h2>
  26.                 <?php  else : ?>
  27.                 <h1>               
  28.                     <?php the_title(); ?>
  29.                 </h1>
  30.                 <?php endif; ?>
  31.             </div>             
  32.         </div>
  33.        
  34.                
  35.         <?php
  36.         if(isset($jdata->hideMeta) && !$jdata->hideMeta) : ?>
  37.         <div class="portfolio-meta blog-meta">
  38.             <ul>           
  39.                 <li class="addby"><i class="icon-user"></i><?php the_author_posts_link(); ?></li>
  40.                 <li class="addtime"><i class="icon-time"></i><?php echo get_the_date(); ?></li>
  41.                 <?php if(isset($jdata->hideComment) && !$jdata->hideComment) { ?>
  42.                 <li class="commentcount"><i class="icon-comment"></i>
  43.                     <a href="<?php the_permalink();?>#comments">
  44.                         <?php comments_number('0', '1', '%'); ?> Comment
  45.                     </a>
  46.                 </li>
  47.                 <?php } ?>
  48.                 <div class="clearboth"></div>
  49.             </ul>
  50.         </div>
  51.         <?php endif; ?>
  52.        
  53.         <div class="blog-container">
  54.             <?php          
  55.             if(is_single() || is_page() || $jdata->fullblog){
  56.                 the_content();
  57.                
  58.                 wp_link_pages( array( 'before' => '<div class="page-link">' . 'Pages : ', 'after' => '</div>' ) );
  59.                  
  60.                 if(has_category()) {
  61.                     $catlink = array();
  62.                     foreach(get_the_category() as $category) {
  63.                         $catlink[] = '<a href="' . get_category_link($category->term_id) . '" title="' . $category->description . '">' . $category->name . '</a>';
  64.                     }
  65.                     $catlink = implode(' , ', $catlink);                   
  66.                     printf(j__("filled_under_lang", 'jegtheme'), $catlink);    
  67.                 }
  68.                
  69.             } else {
  70.                 $ismore = @strpos( $post->post_content, '<!--more-->');
  71.                
  72.                 if($ismore) {
  73.                     echo substr(the_content(), 0, $ismore);
  74.                 } else {
  75.                     the_excerpt();
  76.                 }
  77.             }?>
  78.         </div>
  79.        
  80.         <div class="bottom-bar">
  81.             <?php if(!is_single() && !is_page()): ?>
  82.             <div class="blog-more" style="float: left; margin-right : 10px;">
  83.                 <ul>
  84.                     <li>
  85.                         <a href="<?php the_permalink();?>" data-rel="tooltip" title="<?php j_e("more_detail");?>">
  86.                             <i class="misc-preview"></i>
  87.                         </a>                       
  88.                     </li>
  89.                 </ul>
  90.             </div>
  91.             <?php endif; ?>    
  92.             <div class="blog-like">
  93.                 <ul>
  94.                     <li>
  95.                         <a  target="_blank" href="<?php echo jShareToFacebook(get_permalink(), get_the_title()); ?>" data-rel="tooltip" title="<?php j_e("share_on_facebook_lang");?>"><i class="social-facebook"></i></a>
  96.                     </li>
  97.                     <li>
  98.                         <a target="_blank" href="<?php echo jShareToTwitter(get_permalink()); ?>" data-rel="tooltip" title="<?php j_e("share_on_twitter_lang");?>"><i class="social-twitter"></i></a>
  99.                     </li>
  100.                 </ul>
  101.                
  102.             </div>
  103.             <?php if(is_single() || $jdata->fullblog): ?>
  104.             <div class="postag">
  105.                 <?php the_tags('',''); ?>
  106.             </div>
  107.             <?php endif; ?>
  108.             <div class="clearbottombar"></div>
  109.         </div>
  110.        
  111.         <?php      
  112.             // overrided : comments-functions.php
  113.             if(isset($jdata->hideComment) && !$jdata->hideComment) {
  114.                 comments_template();
  115.             }
  116.         ?>
  117.        
  118.     </div>
  119. </div>
Advertisement
Add Comment
Please, Sign In to add comment