Начальная загрузка в WordPress не работает внутри страницы. Переполнение стека

Я создал страницу, и на этой странице я пытаюсь выполнить два запроса, в которых содержится страница. За исключением страницы, все работает нормально. Вот то, что я пробовал с загрузкой страницы.

<div class="col-xs-12 col-md-9 article-content"><div class="row">
<div id="response">
<div class="session-featured-title">
<h5>Featured Property In <?php echo $area_title;?></h5>
<div class="related-control"><a class="btn prev"><i class="fa fa-arrow-left"></i></a><a class="btn next"><i class="fa fa-arrow-right"></i></a></div>
</div>
<div id="featured" class="owl-carousel owl-theme">
<?php
//Featured Property
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query(); $wp_query->query( array(
'post_type' => $property_type,
'post_status' => 'publish',
'posts_per_page' => -1,
'tax_query' => array( array (
'taxonomy' => 'property_city_taxonomy',
'field' => 'slug',
'terms' => $area_slug,
) ),'meta_query' => array(array(
'key' => 'we_recommend_make-featured-property',
'value' => '1')), )
);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="item"><a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?>">
<div class="featured-image">
<?php the_post_thumbnail('full', array('class' => 'img-responsive') ); ?></div>
<div class="featured-text-holder">
<div class="recent-post-title"><?php the_title(); ?></div>
<div class="featured-meta-detail">
<div class="py-list-price"><?php ro_price(); ?></div>
<div class="py-list-bed"><?php ro_bedroom(); ?></div>
<div class="py-list-bath"><?php ro_bathroom(); ?></div></div>
</div>
</a></div>
<?php endwhile;  wp_reset_postdata(); ?>
</div>
<script>
$(document).ready(function() {
var owl = $("#featured");
$("#featured").owlCarousel({
items : 4,
});
// Custom Navigation Events
$(".next").click(function(){
owl.trigger('owl.next');
})
$(".prev").click(function(){
owl.trigger('owl.prev');
})
$(".play").click(function(){
owl.trigger('owl.play',1000); //owl.play event accept autoPlay speed as second parameter
})
$(".stop").click(function(){
owl.trigger('owl.stop');
})

});
</script>

<?php
property_sorting();
$paged = 1;

$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query(); $wp_query->query( array(
'post_type' => 'forsale', 'post_status' => 'publish',
'posts_per_page' => 1,
'tax_query' => array( array (
'taxonomy' => 'property_city_taxonomy',
'field' => 'slug',
'terms' => 'paphos', ) ),
'meta_query' => array(array(
'key' => 'we_recommend_make-featured-property',
'value' => '1')), )  );

while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php
if(isset($_GET['view'])){ $view_type=$_GET['view']; } else{ $view_type='list'; }
if($view_type=='grid'){
get_template_part( 'template-parts/property', 'grid' );
}
else{
get_template_part( 'template-parts/property', 'list' );
}
?>
<?php endwhile;

if ($wp_query->max_num_pages > 1) :
?>
<nav class="prev-next-posts">
<?php if (function_exists('wp_bootstrap_pagination')) wp_bootstrap_pagination(); ?>
</nav>
<?php endif;
?>

<?php wp_reset_postdata();
?>
</div></div></div>

Ссылка для начальной загрузки
Pagenation Link Страница также фильм в URL, но содержание остается тем же.

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector