%PDF- %PDF-
| Direktori : /home/gachan/www/wp-content/themes/jekas/ |
| Current File : /home/gachan/www/wp-content/themes/jekas/content-gallery.php |
<?php
$post_gallery = array();
if(function_exists('rwmb_meta'))
$post_gallery = rwmb_meta('post_gallery',array('type' => 'image')) ;
$title_resalt = function_exists('rwmb_meta') ? rwmb_meta('post_title_resalt') : '';
$jekas_print = !empty($title_resalt) ? str_replace($title_resalt,"<span>$title_resalt</span>",get_the_title()) : get_the_title();
$categories = wp_get_post_categories($post->ID,array('fields' => 'all'));
?>
<div class="post">
<?php if(!empty($post_gallery)):?>
<ul class="carousel-single" id="carousel-single">
<?php foreach($post_gallery as $image):?>
<li><img class="image-responsive" src="<?php print esc_url($image['full_url']) ?>" alt=""/> </li>
<?php endforeach;?>
</ul>
<?php else:?>
<img class="paddin_top_mini" src="<?php print get_template_directory_uri()?>img/post-image.jpg " alt="Image"/>
<?php endif;?>
<h2><a href="<?php esc_url(get_permalink())?>"> <?php print $jekas_print ?> </a></h2>
<?php if(is_single()):?>
<div class="post-meta">
<span><i class="fa fa-user"></i> <?php esc_html_e('By','jekas')?> <a href="<?php print esc_url(get_permalink())?>"> <?php print get_the_author()?></a></span>
<span><i class="fa fa-tag"></i>
<?php foreach($categories as $key => $category):?>
<a href="<?php print esc_url(get_category_link($category))?>"><?php print $category->name?></a>
<?php if ($key < count($categories) - 1) print ',' ; ?>
<?php endforeach;?>
</span>
<span><i class="fa fa-comments"></i> <a href="<?php print esc_url(get_permalink())?>"><?php print get_comments_number().' '.esc_html__('Comments','jekas'); ?></a></span>
</div>
<?php print apply_filters('the_content',$post->post_content);?>
<?php elseif(is_page()) : ?>
<p><?php print wp_trim_words(htmlentities($post->post_content),18,'...')?></p>
<div class="post-meta">
<span><i class="fa fa-user"></i><?php esc_html_e('By','jekas') ?><a href="<?php print esc_url(get_permalink())?>"> <?php print get_the_author()?></a></span>
<span><i class="fa fa-tag"></i>
<?php foreach($categories as $key => $category):?>
<a href="<?php print esc_url(get_category_link($category))?>"><?php print $category->name?></a>
<?php if ($key < count($categories) - 1) print ',' ; ?>
<?php endforeach;?>
</span>
<span><i class="fa fa-comments"></i> <a href="<?php print esc_url(get_permalink())?>"><?php print get_comments_number().' '.esc_html__('Comments','jekas'); ?></a></span>
<br>
<a href="<?php print esc_url(get_permalink())?>" class="btn btn-primary pull-center"> <?php esc_html_e('Read More','jekas')?></a>
</div>
<?php endif;?>
</div>