vinoddalvi

content-single.php

Dec 29th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.38 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package sparkling
  4.  */
  5. ?>
  6.  
  7. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  8.     <?php the_post_thumbnail( 'sparkling-featured', array( 'class' => 'single-featured' )); ?>
  9.     <div class="post-inner-content">
  10.         <header class="entry-header page-header">
  11.  
  12.             <h1 class="entry-title "><?php the_title(); ?></h1>
  13.  
  14.             <div class="entry-meta">
  15.                 <?php sparkling_posted_on(); ?>
  16.  
  17.                 <?php
  18.                     /* translators: used between list items, there is a space after the comma */
  19.                                         $categories_list = '';
  20.  
  21.                                         foreach((get_the_category()) as $category) {
  22.                                             if($category->name == 'Cat Name' ) continue;
  23.                                             $category_id = get_cat_ID( $category->cat_name );
  24.                                             $category_link = get_category_link( $category_id );
  25.                                             if( $categories_list != '' ) $categories_list .= ', ';
  26.                                             $categories_list .= '<a href="'.$category_link.'">'.$category->cat_name.'</a>';
  27.                                         }
  28.                     if ( $categories_list && sparkling_categorized_blog() ) :
  29.                 ?>
  30.                 <span class="cat-links"><i class="fa fa-folder-open-o"></i>
  31.                     <?php printf( esc_html__( ' %1$s', 'sparkling' ), $categories_list ); ?>
  32.                 </span>
  33.                 <?php endif; // End if categories ?>
  34.                 <?php edit_post_link( esc_html__( 'Edit', 'sparkling' ), '<i class="fa fa-pencil-square-o"></i><span class="edit-link">', '</span>' ); ?>
  35.  
  36.             </div><!-- .entry-meta -->
  37.         </header><!-- .entry-header -->
  38.  
  39.         <div class="entry-content">
  40.             <?php the_content(); ?>
  41.             <?php
  42.                 wp_link_pages( array(
  43.                     'before'            => '<div class="page-links">'.esc_html__( 'Pages:', 'sparkling' ),
  44.                     'after'             => '</div>',
  45.                     'link_before'       => '<span>',
  46.                     'link_after'        => '</span>',
  47.                     'pagelink'          => '%',
  48.                     'echo'              => 1
  49.                 ) );
  50.             ?>
  51.         </div><!-- .entry-content -->
  52.  
  53.         <footer class="entry-meta">
  54.  
  55.             <?php if(has_tag()) : ?>
  56.           <!-- tags -->
  57.           <div class="tagcloud">
  58.  
  59.               <?php
  60.                   $tags = get_the_tags(get_the_ID());
  61.                   foreach($tags as $tag){
  62.                       echo '<a href="'.get_tag_link($tag->term_id).'">'.$tag->name.'</a> ';
  63.                   } ?>
  64.  
  65.           </div>
  66.           <!-- end tags -->
  67.           <?php endif; ?>
  68.  
  69.         </footer><!-- .entry-meta -->
  70.     </div>
  71.  
  72.     <?php if (get_the_author_meta('description')) :  ?>
  73.         <div class="post-inner-content secondary-content-box">
  74.       <!-- author bio -->
  75.       <div class="author-bio content-box-inner">
  76.  
  77.         <!-- avatar -->
  78.         <div class="avatar">
  79.             <?php echo get_avatar(get_the_author_meta('ID') , '60'); ?>
  80.         </div>
  81.         <!-- end avatar -->
  82.  
  83.         <!-- user bio -->
  84.         <div class="author-bio-content">
  85.  
  86.           <h4 class="author-name"><a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php echo get_the_author_meta('display_name'); ?></a></h4>
  87.           <p class="author-description">
  88.               <?php echo get_the_author_meta('description'); ?>
  89.           </p>
  90.  
  91.         </div><!-- end .author-bio-content -->
  92.  
  93.       </div><!-- end .author-bio  -->
  94.  
  95.         </div>
  96.         <?php endif; ?>
  97.  
  98. </article><!-- #post-## -->
Add Comment
Please, Sign In to add comment