File "style-2.php"
Full Path: /var/www/bvnghean.vn/save_bvnghean.vn/wp-content/themes/publisher/views/general/post/style-2.php
File size: 4.84 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* style-2.php
*---------------------------
* Post template style 2.
*/
$layout = publisher_get_page_layout();
switch ( $layout ) {
case '2-col-right':
$container_class = 'container layout-2-col layout-right-sidebar post-template-2';
$main_col_class = 'col-sm-8 content-column';
$aside_col_class = 'col-sm-4 sidebar-column';
break;
case '2-col-left':
$container_class = 'container layout-2-col layout-left-sidebar post-template-2';
$main_col_class = 'col-sm-8 col-sm-push-4 content-column';
$aside_col_class = 'col-sm-4 col-sm-pull-8 sidebar-column';
break;
case '1-col':
$container_class = 'container layout-1-col layout-no-sidebar post-template-2';
$main_col_class = 'col-sm-12 content-column';
$aside_col_class = '';
break;
}
$post_settings = publisher_get_option( 'post-page-settings' );
$social_share = publisher_get_option( 'social_share_single' );
?>
</div> <!-- .content-wrap -->
<?php $img = publisher_get_thumbnail( publisher_get_prop_thumbnail_size( 'publisher-full' ) ); ?>
<div class="post-header post-tp-2-header" style="background-image: url(<?php echo $img['src']; ?>);">
<div class="content-wrap">
<div class="container">
<div class="post-header-inner">
<div class="post-header-title">
<?php
if ( $post_settings['term'] ) {
publisher_cats_badge_code( get_post_format() ? 2 : 3, '', TRUE, TRUE, 'floated' );
}
?>
<h1 class="single-post-title">
<span <?php publisher_attr( 'post-title' ); ?>><?php the_title(); ?></span></h1>
<?php
if ( $post_settings['meta']['show'] ) {
publisher_set_prop( 'hide-meta-author', ! $post_settings['meta']['author'] );
publisher_set_prop( 'hide-meta-date', ! $post_settings['meta']['date'] );
publisher_set_prop( 'hide-meta-views', ! $post_settings['meta']['views'] );
publisher_set_prop( 'hide-meta-comment', ! $post_settings['meta']['comment'] );
publisher_set_prop( 'hide-meta-review', ! $post_settings['meta']['review'] );
publisher_get_view( 'post', '_meta' );
}
?>
</div>
<?php
if ( bf_get_post_meta( 'bs_featured_image_credit' ) != '' ) {
?>
<span class="image-credit"><?php bf_echo_post_meta( 'bs_featured_image_credit' ); ?></span>
<?php
}
?>
</div>
</div>
</div>
</div><!-- .slider-container -->
<div class="content-wrap">
<div class="<?php echo $container_class; // escaped before ?>">
<div class="row main-section">
<div class="<?php echo $main_col_class; // escaped before ?>">
<div class="single-container">
<article <?php publisher_attr( 'post', 'single-post-content' ); ?>>
<?php
// Social share buttons
if ( $social_share == 'show' || $social_share == 'top-bottom' ) {
publisher_listing_social_share( '', 'single-post-share top-share', TRUE );
}
?>
<div <?php publisher_attr( 'post-content', 'clearfix single-post-content' ); ?>>
<?php publisher_the_content(); ?>
</div>
<?php
// Shows source
if ( bf_get_post_meta( '_bs_source_url' ) || bf_get_post_meta( '_bs_source_url_2' ) || bf_get_post_meta( '_bs_source_url_3' ) ) {
publisher_get_view( 'post', '_source', 'default' );
}
// Shows via
if ( bf_get_post_meta( '_bs_via_url' ) || bf_get_post_meta( '_bs_via_url_2' ) || bf_get_post_meta( '_bs_via_url_3' ) ) {
publisher_get_view( 'post', '_via', 'default' );
}
// Shows post tags
if ( publisher_has_tag() ) {
publisher_get_view( 'post', '_tags', 'default' );
}
// Social share buttons
if ( $social_share == 'bottom' || $social_share == 'top-bottom' ) {
publisher_listing_social_share( '', 'single-post-share bottom-share', TRUE );
}
// post info for SEO
publisher_get_view( 'post', '_info', 'default' );
?>
</article>
<?php
// Before author box ads
publisher_show_ad_location( 'post_before_author_box', array( 'container-class' => 'adloc-post-before-author' ) );
// Author box
if ( publisher_get_option( 'post_author_box' ) == 'show' ) {
publisher_get_view( 'post', '_author' );
}
?>
</div>
<?php
// Related posts
if ( publisher_get_related_post_type() == 'show' ) {
publisher_get_view( 'post', '_related' );
}
// Comments and comment form
publisher_comments_template();
// Ad after first post for related posts
if ( publisher_get_related_post_type() == 'infinity-related-post' ) {
publisher_show_ad_location( 'post_ajax_related', array( 'container-class' => 'adloc-ajaxed-related' ) );
}
?>
</div><!-- .content-column -->
<?php if ( $layout != '1-col' ) { ?>
<div class=" <?php echo $aside_col_class; // escaped before ?>">
<?php get_sidebar(); ?>
</div><!-- .sidebar-column -->
<?php } ?>
</div><!-- .main-section -->
</div><!-- .layout-2-col -->