<?php
get_header();
//custom header
if (class_exists(‘Kirki’)) {
do_action(‘mancink-custom-header’, ‘mancink_header_start’);
} else { ?>
<!–Fall back if no kirki installed–>
<!–HOME START–>
<div class=”default-header clearfix”>
<!–HEADER START–>
<?phpget_template_part(‘loop/menu’, ‘normal’); ?>
<!–HEADER END–>
</div>
<!–/home end–>
<!–HOME END–>
<?php } ?>
<!–breadcrumb if available–>
<?php if (function_exists(‘mancink_breadcrumb’)) { ?>
<div class=”box-crumb clearfix”>
<divclass=”slider-mask”></div>
<divclass=”container-fluid”>
<?phpif (function_exists(‘mancink_breadcrumb’)) {
mancink_breadcrumb();
} ?>
<h1class=”blog-title”><?phpthe_title(); ?></h1>
</div>
</div>
<?php } ?>
<div class=”content blog-wrapper”>
<divclass=”container-fluid clearfix”>
<divclass=”row clearfix”>
<divclass=”blog-content
<?phpif (function_exists(‘dynamic_sidebar’)) {
if (is_active_sidebar(‘default-sidebar’)) {
if (get_post_meta(get_the_ID(), ‘post_sidebar’, true) == ” || get_post_meta($post->ID, ‘post_sidebar’, true) == ‘show’) {
echo’col-md-8′;
} else {
echo’col-md-12′;
}
} else {
echo’col-md-12′;
}
} ?>”>
<!–BLOG POST START–>
<?phpwhile (have_posts()) : the_post(); ?>
<articleid=”post-<?phpthe_ID(); ?>”<?phppost_class(‘clearfix blog-post’); ?>>
<!–if post is standard–>
<?phpif (get_post_meta(get_the_ID(), ‘post_format’, true) == ”) {
if ( has_post_thumbnail() ) {
the_post_thumbnail();
if (!function_exists(‘mancink_breadcrumb’)) { //if no breadcumb
echo'<div class=”spacing30 clearfix”></div>’;
}
}
} ?>
<?phpif (get_post_meta(get_the_ID(), ‘post_format’, true) == ‘post_standard’) { ?>
<?phpthe_post_thumbnail(‘full’, array(‘class’ => ‘full-size-img’)); ?>
<!–if post is gallery–>
<?php } elseif (get_post_meta(get_the_ID(), ‘post_format’, true) == ‘post_gallery’) { ?>
<divclass=”blog-gallery clearboth clearfix”>
<?php/* get the gallery list array */
$lists = get_post_meta(get_the_ID(), ‘post_gallery_setting’, 1);
if (!empty($lists)) {
foreach ((array) $lists as $list => $attachment_url) { ?>
<div>
<aclass=”blog-popup-img”
href=”<?phpechoesc_url(wp_get_attachment_image_url($list, ‘full’)); ?>”>
<span>
<iclass=”fa fa-search”></i>
</span>
<?phpechowp_get_attachment_image($list, ‘full’) ?>
</a>
</div>
<?php }
} ?>
</div>
<?php//if post is slider
} else if (get_post_meta(get_the_ID(), ‘post_format’, true) == ‘post_slider’) { ?>
<divclass=”blog-slider ani-slider slider”data-slick='{“autoplaySpeed”:
<?phpif (class_exists(‘Kirki’) && get_theme_mod(‘mancink_blog_slider_delay’) != ”) {
echoesc_attr(get_theme_mod(‘mancink_blog_slider_delay’));
} else {
echo’8000′;
} ?> }’>
<?php/* get the gallery list array */
$sliders = get_post_meta(get_the_ID(), ‘post_slider_setting’, 1);
if (!empty($sliders)) {
foreach ((array) $sliders as $slider => $attachment_url) { ?>
<divclass=”slide”>
<divclass=”slider-mask”data-animation=”slideLeftReturn”data-delay=”0.1s”></div>
<divclass=”slider-img-bg blog-img-bg”data-animation=”fadeIn”data-delay=”0.2s”
data-animation-duration=”0.7s”
data-background=”<?phpechoesc_url(wp_get_attachment_image_url($slider, ‘full’)); ?>”>
</div>
<divclass=”blog-slider-box”>
<divclass=”slider-content”></div>
</div>
<!–/.blog-slider-box–>
</div>
<!–/.slide–>
<?php }
} ?>
</div>
<?php//if post video
} else if (get_post_meta(get_the_ID(), ‘post_format’, true) == ‘post_video’) {
echo'<div class=”video”><iframe width=”560″ height=”315″
src=”‘ . esc_attr(get_post_meta(get_the_ID(), ‘post_video_setting’, true)) . ‘?wmode=opaque;rel=0;showinfo=0;controls=0;iv_load_policy=3″></iframe></div>’;
//if post audio
} else if (get_post_meta(get_the_ID(), ‘post_format’, true) == ‘post_audio’) { ?>
<divclass=”audio”>
<?php$mancink_audio = get_post_meta(get_the_ID(), ‘post_audio_setting’, true);
echowp_kses($mancink_audio, array(
‘iframe’ => array(
‘src’ => array(),
‘width’ => array(),
‘height’ => array(),
‘scrolling’ => array(),
‘frameborder’ => array(),
),
)); ?>
</div>
<?php } ?>
<!–only display if no breadcrumb –>
<?phpif (!function_exists(‘mancink_breadcrumb’)) { ?>
<divclass=”blogtitle-box clearfix”>
<h1class=”blog-title”><?phpthe_title(); ?></h1>
</div>
<?php } ?>
<divclass=”spacing30 clearfix”></div>
<divclass=”the-content-inner clearfix”>
<?phpthe_content(); ?>
</div>
<divclass=”spacing30 clearfix”></div>
<ulclass=”post-detail single-post-detail”>
<?phpif (has_category()) { ?>
<li><iclass=”fa fa-archive”></i><?phpthe_category(‘, ‘); ?></li>
<?php } ?>
<?phpif (get_the_tag_list()) { ?>
<li><iclass=”fa fa-tags”></i>
<?phpthe_tags(”, ‘, ‘); ?>
</li>
<?php } ?>
<li><iclass=”fa fa-calendar-o”></i><?phpechoget_the_date(); ?></li>
</ul>
<divclass=”post-pager clearfix”>
<?phpwp_link_pages(); ?>
</div>
<!–RELATED POST–>
<?phpif (function_exists(‘dynamic_sidebar’)) {
if (is_active_sidebar(‘default-sidebar’)) {
if (get_post_meta(get_the_ID(), ‘post_sidebar’, true) == ” || get_post_meta($post->ID, ‘post_sidebar’, true) == ‘show’) {
get_template_part(‘loop/related’, ‘post’);
} else {
get_template_part(‘loop/related’, ‘post-two’);
}
} else {
get_template_part(‘loop/related’, ‘post-two’);
}
} ?>
<!–RELATED POST END–>
<?phpif (!post_password_required()) { //only show comment if post not password protected
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) :
comments_template();
endif;
} ?>
</article>
<!–/.blog-post–>
<!–BLOG POST END–>
<?phpendwhile; ?>
<divclass=”img-pagination”>
<?php$mancink_prevPost = get_previous_post();
if ($mancink_prevPost) { ?>
<divclass=”pagi-nav-box previous”>
<?php$mancink_prevthumbnail = get_the_post_thumbnail($mancink_prevPost->ID, array(300, 300));
$mancink_prev = esc_html__(‘Previous post’, ‘mancink’); ?>
<?phpprevious_post_link(‘%link’, “<div class=’img-pagi’><i class=’fa fa-arrow-left’></i>
<div class=’pagimgbox’>$mancink_prevthumbnail</div></div> <div class=’imgpagi-box’><h4 class=’pagi-title’>%title</h4> <p>$mancink_prev</p></div>”); ?>
</div>
<?php }
$mancink_nextPost = get_next_post();
if ($mancink_nextPost) { ?>
<divclass=”pagi-nav-box next”>
<?php$mancink_nextthumbnail = get_the_post_thumbnail($mancink_nextPost->ID, array(300, 300));
$mancink_next = esc_html__(‘Next post’, ‘mancink’); ?>
<?phpnext_post_link(‘%link’, “<div class=’imgpagi-box’><h4 class=’pagi-title’>%title</h4> <p>$mancink_next</p></div> <div class=’img-pagi’><i class=’fa
fa-arrow-right’></i><div class=’pagimgbox’>$mancink_nextthumbnail</div></div> “); ?>
</div>
<?php } ?>
</div>
<!–/.img-pagination–>
</div>
<!–/.col-md-8–>
<?phpif (get_post_meta(get_the_ID(), ‘post_sidebar’, true) == ” || get_post_meta($post->ID, ‘post_sidebar’, true) == ‘show’) { ?>
<?phpif (function_exists(‘dynamic_sidebar’)) {
if (is_active_sidebar(‘default-sidebar’)) {
get_sidebar();
}
} ?>
<?php } ?>
</div>
<!–/.row–>
</div>
<!–/.container–>
</div>
<!–/.blog-wrapper–>
<?php
//custom footer
if (class_exists(‘Kirki’)) {
do_action(‘mancink-custom-footer’, ‘mancink_footer_start’);
} else {
//fallback if no kirki installed
get_template_part(‘loop/bottom’, ‘footer’);
}
get_footer(); ?>
- ersinscorpy
- Haziran 29, 2024