<?php
/*
Theme Designed By: Meysam Hosseinkhani
Email: Meysam98@Gmail.com
Author Website: Hosseinkhani.ir
*/
   // Exit if accessed directly
   if (!defined('ABSPATH')) {
    exit;
} ?>

<?php if ($az_data['show_recent_prod']) { ?>
<!-- start most viewed -->
<div class="rcon">
   <div class="m-product">
             <div class="post-title"><h3><i aria-hidden="true" class="<?php echo $az_data['recent_prod_icon']; ?>"></i><?php echo $az_data['recent_prod_title']; ?></h3></div>
               <div class="owl-carousel <?php if($az_data['recent_prod_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
                $recentpost = new WP_Query( array(
                    'posts_per_page' => 8,
                    'post_type' => 'download',
                    'post_status' => 'publish',
                    'order' => 'DESC'  ) );    
               if ( $recentpost->have_posts() ) {
               while ( $recentpost->have_posts() ) : $recentpost->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <div class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                        <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <div class="figcaption">
                           <?php the_title(); ?>
                        </div>
                     </div>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'فایلی با شرایط مورد نظر یافت نشد.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!-- end most viewed -->
<?php } ?>

<?php if ($az_data['show_block_one'] && is_front_page()) { ?>
<!--- Block-One --->
<div class="rcon">
   <div class="m-product">
      <div class="post-title">
         <h3>
            <?php if(!empty($az_data['block_one_cat'])) { ?>
            <a href="<?php echo get_term_link((int)$az_data['block_one_cat'],'download_category'); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['block_one_icon']; ?>"></i><?php echo $az_data['block_one_title']; ?>
            <?php if(!empty($az_data['block_one_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['block_one_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_term_link((int)$az_data['block_one_cat'],'download_category'); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
      </div>
            <div class="owl-carousel <?php if($az_data['block_one_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $block_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'download',
               'post_status' => 'publish',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'download_category',
                        'field' => 'term_id', //can be set to ID
                        'terms' => $az_data['block_one_cat']
                    )
                ),
               'order' => 'DESC'  ) );                      
               if ( $block_one->have_posts() ){
               while ( $block_one->have_posts() ) : $block_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <figure class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                        <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <figcaption class="figcaption">
                           <?php the_title(); ?>
                        </figcaption>
                     </figure>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا فایلی را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- Block-One --->
<?php } ?>

<?php if ($az_data['show_block_two'] && is_front_page()) { ?>
<!--- Block-Two --->
<div class="rcon">
   <div class="m-product">
      <div class="post-title">
         <h3>
            <?php if(!empty($az_data['block_two_cat'])) { ?>
            <a href="<?php echo get_term_link((int)$az_data['block_two_cat'],'download_category'); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['block_two_icon']; ?>"></i><?php echo $az_data['block_two_title']; ?>
            <?php if(!empty($az_data['block_two_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['block_two_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_term_link((int)$az_data['block_two_cat'],'download_category'); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
      </div>
               <div class="owl-carousel <?php if($az_data['block_two_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $block_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'download',
               'post_status' => 'publish',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'download_category',
                        'field' => 'term_id', //can be set to ID
                        'terms' => $az_data['block_two_cat']
                    )
                ),
               'order' => 'DESC'  ) );                           
               if ( $block_one->have_posts() ){
               while ( $block_one->have_posts() ) : $block_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <figure class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                       <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <figcaption class="figcaption">
                           <?php the_title(); ?>
                        </figcaption>
                     </figure>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا فایلی را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- Block-Two --->
<?php } ?>

<?php if ($az_data['show_block_three'] && is_front_page()) { ?>
<!--- Block-Three --->
<div class="rcon">
   <div class="m-product">
   <div class="post-title">
      <h3>
      <?php if(!empty($az_data['block_three_cat'])) { ?>
      <a href="<?php echo get_term_link((int)$az_data['block_three_cat'],'download_category'); ?>">
      <?php } ?>
         <i class="<?php echo $az_data['block_three_icon']; ?>"></i><?php echo $az_data['block_three_title']; ?>
      <?php if(!empty($az_data['block_three_cat'])) { ?>
      </a>
      <?php } ?>
      </h3>
      <?php if(!empty($az_data['block_three_cat'])) { ?>
      <a class="float-left morebtn" href="<?php echo get_term_link((int)$az_data['block_three_cat'],'download_category'); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
      <?php } ?>
   </div>
               <div class="owl-carousel <?php if($az_data['block_three_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $block_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'download',
               'post_status' => 'publish',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'download_category',
                        'field' => 'term_id', //can be set to ID
                        'terms' => $az_data['block_three_cat']
                    )
                ),
               'order' => 'DESC'  ) );                         
               if ( $block_one->have_posts() ){
               while ( $block_one->have_posts() ) : $block_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <figure class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                        <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <figcaption class="figcaption">
                           <?php the_title(); ?>
                        </figcaption>
                     </figure>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا فایلی را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- Block-Three --->
<?php } ?>

<?php if ($az_data['show_block_four'] && is_front_page()) { ?>
<!--- Block-Four --->
<div class="rcon">
   <div class="m-product">
   <div class="post-title">
      <h3>
      <?php if(!empty($az_data['block_four_cat'])) { ?>
      <a href="<?php echo get_term_link((int)$az_data['block_four_cat'],'download_category'); ?>">
      <?php } ?>
         <i class="<?php echo $az_data['block_four_icon']; ?>"></i><?php echo $az_data['block_four_title']; ?>
      <?php if(!empty($az_data['block_four_cat'])) { ?>
      </a>
      <?php } ?>
      </h3>
      <?php if(!empty($az_data['block_four_cat'])) { ?>
      <a class="float-left morebtn" href="<?php echo get_term_link((int)$az_data['block_four_cat'],'download_category'); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
      <?php } ?>
   </div>
               <div class="owl-carousel <?php if($az_data['block_four_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $block_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'download',
               'post_status' => 'publish',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'download_category',
                        'field' => 'term_id', //can be set to ID
                        'terms' => $az_data['block_four_cat']
                    )
                ),
               'order' => 'DESC'  ) );                                       
               if ( $block_one->have_posts() ){
               while ( $block_one->have_posts() ) : $block_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <figure class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                        <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <figcaption class="figcaption">
                           <?php the_title(); ?>
                        </figcaption>
                     </figure>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا فایلی را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- Block-Four --->
<?php } ?>

<?php if ($az_data['show_block_five'] && is_front_page()) { ?>
<!--- Block-Five --->
<div class="rcon">
   <div class="m-product">
   <div class="post-title">
      <h3>
      <?php if(!empty($az_data['block_five_cat'])) { ?>
      <a href="<?php echo get_term_link((int)$az_data['block_five_cat'],'download_category'); ?>">
      <?php } ?>
         <i class="<?php echo $az_data['block_five_icon']; ?>"></i><?php echo $az_data['block_five_title']; ?>
      <?php if(!empty($az_data['block_five_cat'])) { ?>
      </a>
      <?php } ?>
      </h3>
      <?php if(!empty($az_data['block_five_cat'])) { ?>
      <a class="float-left morebtn" href="<?php echo get_term_link((int)$az_data['block_five_cat'],'download_category'); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
      <?php } ?>
   </div>
               <div class="owl-carousel <?php if($az_data['block_five_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $block_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'download',
               'post_status' => 'publish',
                'tax_query' => array(
                    array(
                        'taxonomy' => 'download_category',
                        'field' => 'term_id', //can be set to ID
                        'terms' => $az_data['block_five_cat']
                    )
                ),
               'order' => 'DESC'  ) );
                                                          
               if ( $block_one->have_posts() ){
               while ( $block_one->have_posts() ) : $block_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <figure class="figure">
                        <div class="fig">
                        <span class="fig-price"><?php p_price(get_the_ID()); ?></span> 
                        <?php p_mimg() ?>
                         <?php 
                   if(rwmb_meta( 'file_special' )){ ?>
                <span class="special" aria-hidden="true"><?php echo $az_data['text_special']; ?></span>
                <?php } ?>
                        </div>
                        <figcaption class="figcaption">
                           <?php the_title(); ?>
                        </figcaption>
                     </figure>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا فایلی را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- Block-Five --->
<?php } ?>


<?php if ($az_data['show_pblock_one'] && is_front_page()) { ?>
<!--- pblock-One --->
<div class="rcon">
   <div class="m-product">
      <div class="post-title">
         <h3>
            <?php if(!empty($az_data['pblock_one_cat'])) { ?>
            <a href="<?php echo get_category_link($az_data['pblock_one_cat']); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['pblock_one_icon']; ?>"></i><?php echo $az_data['pblock_one_title']; ?>
            <?php if(!empty($az_data['pblock_one_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['pblock_one_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_category_link($az_data['pblock_one_cat']); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
      </div>
               <div class="owl-carousel <?php if($az_data['pblock_one_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $pblock_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'post',
               'post_status' => 'publish',
               'category__in' => $az_data['pblock_one_cat'],
               'order' => 'DESC'  ) );                
               if ( $pblock_one->have_posts() ){
               while ( $pblock_one->have_posts() ) : $pblock_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <div class="figure">
                        <div class="fig">
                        <span class="fig-price"><span><?php echo $az_data['text_more_text']; ?></span></span> 
                        <?php p_mimg() ?>
                        </div>
                        <div class="figcaption">
                           <?php the_title(); ?>
                        </div>
                     </div>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا نوشته ای را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- pblock-One --->
<?php } ?>

<?php if ($az_data['show_pblock_two'] && is_front_page()) { ?>
<!--- pblock-Two --->
<div class="rcon">
   <div class="m-product">
      <div class="post-title">
         <h3>
            <?php if(!empty($az_data['pblock_two_cat'])) { ?>
            <a href="<?php echo get_category_link($az_data['pblock_two_cat']); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['pblock_two_icon']; ?>"></i><?php echo $az_data['pblock_two_title']; ?>
            <?php if(!empty($az_data['pblock_two_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['pblock_two_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_category_link($az_data['pblock_two_cat']); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
      </div>
               <div class="owl-carousel <?php if($az_data['pblock_two_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $pblock_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'post',
               'post_status' => 'publish',
               'category__in' => $az_data['pblock_two_cat'],
               'order' => 'DESC'  ) );                           
               if ( $pblock_one->have_posts() ){
               while ( $pblock_one->have_posts() ) : $pblock_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <div class="figure">
                        <div class="fig">
                        <span class="fig-price"><span><?php echo $az_data['text_more_text']; ?></span></span> 
                        <?php p_mimg() ?>
                        </div>
                        <div class="figcaption">
                           <?php the_title(); ?>
                        </div>
                     </div>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا نوشته ای را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- pblock-Two --->
<?php } ?>

<?php if ($az_data['show_pblock_three'] && is_front_page()) { ?>
<!--- pblock-Three --->
<div class="rcon">
   <div class="m-product">
      <div class="post-title">
         <h3>
            <?php if(!empty($az_data['pblock_three_cat'])) { ?>
            <a href="<?php echo get_category_link($az_data['pblock_three_cat']); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['pblock_three_icon']; ?>"></i><?php echo $az_data['pblock_three_title']; ?>
            <?php if(!empty($az_data['pblock_three_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['pblock_three_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_category_link($az_data['pblock_three_cat']); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
      </div>
               <div class="owl-carousel <?php if($az_data['pblock_three_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $pblock_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'post',
               'post_status' => 'publish',
               'category__in' => $az_data['pblock_three_cat'],
               'order' => 'DESC'  ) );                        
               if ( $pblock_one->have_posts() ){
               while ( $pblock_one->have_posts() ) : $pblock_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <div class="figure">
                        <div class="fig">
                        <span class="fig-price"><span><?php echo $az_data['text_more_text']; ?></span></span> 
                        <?php p_mimg() ?>
                        </div>
                        <div class="figcaption">
                           <?php the_title(); ?>
                        </div>
                     </div>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا نوشته ای را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- pblock-Three --->
<?php } ?>

<?php if ($az_data['show_pblock_four'] && is_front_page()) { ?>
<!--- pblock-Four --->
<div class="rcon">
   <div class="m-product">
   <div class="post-title">
      <h3>
            <?php if(!empty($az_data['pblock_four_cat'])) { ?>
            <a href="<?php echo get_category_link($az_data['pblock_four_cat']); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['pblock_four_icon']; ?>"></i><?php echo $az_data['pblock_four_title']; ?>
            <?php if(!empty($az_data['pblock_four_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['pblock_four_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_category_link($az_data['pblock_four_cat']); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
   </div>
               <div class="owl-carousel <?php if($az_data['pblock_four_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $pblock_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'post',
               'post_status' => 'publish',
               'category__in' => $az_data['pblock_four_cat'],
               'order' => 'DESC'  ) );                                   
               if ( $pblock_one->have_posts() ){
               while ( $pblock_one->have_posts() ) : $pblock_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
               <div class="r-box r-box-view">
                  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                     <div class="figure">
                        <div class="fig">
                        <span class="fig-price"><span><?php echo $az_data['text_more_text']; ?></span></span> 
                        <?php p_mimg() ?>
                        </div>
                        <div class="figcaption">
                           <?php the_title(); ?>
                        </div>
                     </div>
                  </a>
               </div>
            </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا نوشته ای را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- pblock-Four --->
<?php } ?>

<?php if ($az_data['show_pblock_five'] && is_front_page()) { ?>
<!--- pblock-Five --->
<div class="rcon">
   <div class="m-product">
   <div class="post-title">
      <h3>
            <?php if(!empty($az_data['pblock_five_cat'])) { ?>
            <a href="<?php echo get_category_link($az_data['pblock_five_cat']); ?>">
            <?php } ?>
               <i class="<?php echo $az_data['pblock_five_icon']; ?>"></i><?php echo $az_data['pblock_five_title']; ?>
            <?php if(!empty($az_data['pblock_five_cat'])) { ?>
            </a>
            <?php } ?>
         </h3>
         <?php if(!empty($az_data['pblock_five_cat'])) { ?>
         <a class="float-left morebtn" href="<?php echo get_category_link($az_data['pblock_five_cat']); ?>"><?php echo $az_data['text_more']; ?> <i class="fas fa-chevron-left"></i></a>
         <?php } ?>
   </div>
               <div class="owl-carousel <?php if($az_data['pblock_five_play']) { echo 'auto-play'; } else {echo 'nauto-play';} ?>">
            <?php
               $pblock_one = new WP_Query( array(
               'posts_per_page' => 8,
               'post_type' => 'post',
               'post_status' => 'publish',
               'category__in' => $az_data['pblock_five_cat'],
               'order' => 'DESC'  ) );
                                                          
               if ( $pblock_one->have_posts() ){
               while ( $pblock_one->have_posts() ) : $pblock_one->the_post(); ?>
               <div class="item">
                  <div class="rcol">
                     <div class="r-box r-box-view">
                        <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                           <div class="figure">
                              <div class="fig">
                              <span class="fig-price"><span><?php echo $az_data['text_more_text']; ?></span></span> 
                              <?php p_mimg() ?>
                              </div>
                              <div class="figcaption">
                                 <?php the_title(); ?>
                              </div>
                           </div>
                        </a>
                     </div>
                  </div>
               </div>
               <?php endwhile;
                   }
                else {echo 'لطفا ابتدا نوشته ای را اضافه نمایید.';}
                     wp_reset_postdata();
                     ?>
         </div>
   </div>
</div>
<!--- pblock-Five --->
<?php } ?>