navasena/wp-content/themes/thinkai/page.php

106 lines
3.5 KiB
PHP

<?php
/**
* Default Template Main File.
*
* @package THINKAI
* @author TonaTheme
* @version 1.0
*/
get_header();
$options = thinkai_WSH()->option();
$data = \THINKAI\Includes\Classes\Common::instance()->data( 'single' )->get();
$layout = $data->get( 'layout' );
$sidebar = $data->get( 'sidebar' );
$layout = ( $layout ) ? $layout : 'full';
$sidebar = ( $sidebar ) ? $sidebar : '';
if (is_active_sidebar( $sidebar )) {$layout = 'right';} else{$layout = 'full';}
$class = ( !$layout || $layout == 'full' ) ? 'col-xl-12 col-lg-12 col-md-12' : 'col-xl-8 col-lg-12 col-md-12';
?>
<?php if ( $data->get( 'enable_banner' ) ) : ?>
<?php do_action( 'thinkai_banner', $data );?>
<?php else:?>
<!--Start breadcrumb Style1-->
<section class="breadcrumb-style1 <?php if( $data->get( 'banner' ) ) echo 'm-t130'?>">
<?php if( $data->get( 'banner' ) ){?>
<div id="particles-js"></div>
<div class="breadcrumb-style1-bg" style="background-image: url(<?php echo esc_url( $data->get( 'banner' ) ); ?>);"></div>
<?php } ?>
<!--Start Scrolling Text Style6-->
<?php
$features_list = $options->get('features_list');
if(!empty($features_list)){
$features_list = explode("\n", ($features_list));
?>
<div class="scrolling-text-style6">
<div class="inner">
<ul class="clearfix marquee_mode">
<?php foreach($features_list as $features): ?>
<li data-hover="<?php echo wp_kses($features, true); ?>">
<?php echo wp_kses($features, true); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php } ?>
<!--End Scrolling Text Style6-->
<div class="container">
<div class="inner-content">
<div class="title text-center">
<h2><?php if ($data->get('title')) { echo wp_kses($data->get('title'), true); } else { the_title(); } ?></h2>
</div>
</div>
</div>
</section>
<!--End breadcrumb Style1-->
<?php endif;?>
<!--Start Blog Page Three-->
<section class="blog-page-three">
<div class="container">
<div class="row">
<?php
if ( $data->get( 'layout' ) == 'left' ) {
do_action( 'thinkai_sidebar', $data );
}
?>
<div class="content-side <?php echo esc_attr( $class ); ?> <?php if ( $data->get( 'layout' ) == 'left' ) echo 'pl-0'; elseif ( $data->get( 'layout' ) == 'right' ) echo ''; ?>">
<div class="blog-page-three__content">
<div class="thm-unit-test">
<?php while ( have_posts() ): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<div class="clearfix"></div>
<?php
$defaults = array(
'before' => '<div class="paginate-links">' . esc_html__( 'Pages:', 'thinkai' ),
'after' => '</div>',
);
wp_link_pages( $defaults );
?>
<?php comments_template() ?>
</div>
</div>
</div>
<?php
if ( $layout == 'right' ) {
$data->set('sidebar', 'default-sidebar');
do_action( 'thinkai_sidebar', $data );
}
?>
</div>
</div>
</section>
<!-- blog section with pagination -->
<?php get_footer(); ?>