Why you do not receive a response from the server when the asynchronous output posts in WordPress?

0 like 0 dislike
11 views
The Preface, made a custom post type "properties"(buildings). They inserted a custom field, which later was going to filter these records.
Did this guide: https://misha.blog/wordpress/filtryi-zapisey-i-tov...

In the end, have the following form:
The image form
5bf6a1c4d8227970533854.png
by | 11 views

1 Answer

0 like 0 dislike
In General everything is decided, everything is eerily clear, the handler does not return anything, here came the void T_T. As always the solution under the nose.

Added to the handler before wp_die():
$buildings = get_posts( $args ); foreach( $buildings as $post ){ setup_postdata($post); ?> \r\r
Card image cap\r
\r
<?php echo $post->price; ?> ₽
\r

\r<?php\rif ($post->room == 'Studio') { echo ($post->room . ', ' . $post->space . ' m2'); }else{ echo ($post->room . 'bedroom apartment' . $post->space . ' m2'); } ?>
\r<?php echo ($post->district . '
str ' . $post->city . 'the house' . $post->house); ?>

\rGo
\r\r\r<?php\rthe_post();\r}\rwp_reset_postdata();</code>
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,742 users