File: /hosting/kak.bg/web/wp-content/themes/kak/content-single.php
<?php
/**
* The template for displaying content in the single.php template
*
* @package WordPress
* @file content-single.php
* @author DesignPicnicStudio
* @link http://designpicnic.com
*/
?>
<div class="post-wrap">
<div class="breadcrumbs">
<?php if(function_exists('bcn_display'))
{
bcn_display();
}?>
</div>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
$show_feat_img = get_post_meta($post->ID, 'fp_meta_post_add_featimg', true);
if ($show_feat_img == 1){ ?>
<div class="entry-image">
<?php the_post_thumbnail( 'fp770_375' ); ?>
</div>
<?php
}
$saved_img_ids = get_post_meta($post->ID, 'fp_meta_gallery_img_ids', true);
if (!empty($saved_img_ids)) { ?>
<script>
jQuery(document).ready(function($) {
$('.entry-slider').show();
$('.entry-slider-main').flexslider({
animation: "slide",
controlNav: false,
animationLoop: true,
slideshow: true,
});
});
</script>
<div class="entry-slider">
<div class="entry-slider-main flexslider">
<ul class="slides">
<?php $img_ids = explode(',',$saved_img_ids);
foreach($img_ids as $img_id) {
if (is_numeric($img_id)) {
$image_attributes = wp_get_attachment_image_src( $img_id, 'fp770_375');?>
<li><img class="attachment-fp770_375" src="<?php echo $image_attributes[0]; ?>"></li>
<?php
}
}
?>
</ul>
</div>
</div>
<?php } ?>
<h1><?php the_title(); ?></h1>
</header>
<?php
$show_video = get_post_meta($post->ID, 'fp_meta_post_add_video', true);
if ($show_video == 1){
$video_code = get_post_meta($post->ID, 'fp_meta_post_video_code', true); ?>
<div class="entry-video">
<?php echo $video_code; ?>
</div>
<?php } ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'fairpixels' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- /entry-content -->
<div class="entry-footer">
<div class="categories"><span class="icon"><i class="fa fa-folder"></i></span><?php the_category(' ' ); ?></div>
<?php the_tags('<div class="tags"><span class="icon"><i class="fa fa-tags"></i></span>',' ','</div>'); ?>
</div>
<?php setPostViews(get_the_ID()); ?>
</article><!-- /post-<?php the_ID(); ?> -->
<?php if ( fp_get_settings( 'fp_show_post_author' ) == 1 ) { ?>
<div class="entry-author">
<div class="author-avatar">
<?php echo wp_get_attachment_image(get_the_author_meta('profile_picture'), array(240, 165), 0, array('style' => 'display: block;')); ?>
</div>
<div class="author-description">
<h5><?php printf( __( 'About %s', 'fairpixels' ), get_the_author() ); ?></h5>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'fairpixels' ), get_the_author() ); ?>
</a>
</div>
</div>
</div><!-- /entry-author -->
<?php } //endif;
if ( fp_get_settings( 'fp_show_related_posts' ) == 1 ){
get_template_part( 'includes/related-posts' );
}
?>
</div><!-- /post-wrap -->