<?php
/**
   * The template for Slider.
   *
   *
   * @package   cuisine WordPress Theme
   * @copyright Copyright (C) 2015, OrdaSoft
   * @license    http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author      AUTHOR <www.ordasoft.com>
   * cuisine is distributed under the terms of the GNU GPL
*/
?>
<div id="slider" class="swiper-container">
        <div class="swiper-wrapper">
        <?php $text_slider = new WP_Query (array(
            'post_type' => 'text_slider',
            'posts_per_page' => -1,
        )); ?>
        <?php if($text_slider -> have_posts() ): ?>
        <?php while($text_slider -> have_posts() ) : $text_slider -> the_post();?>
            <div class="swiper-slide">
                <div class="slide-content">
                        <h1><?php echo get_the_title() ?></h1>
                        <p><?php echo the_content() ?></p>
                </div>
            </div>
        <?php wp_reset_query();?>
        <?php endwhile; ?>
        <?php else : ?>
            <h2><?php  _e('NO Slide', 'personnew'); ?></h2>
        <?php endif; ?>
        </div>
         <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
</div>