$query = "CREATE TEMPORARY TABLE foo AS SELECT * FROM texts WHERE id = 465";
$query .= "UPDATE foo SET id = 838, html_text = 'test', text_lang = 'french'";
$query .= "INSERT INTO texts SELECT * FROM foo";
$query .= "DROP TABLE foo";
mysqli_multi_query($link, $query);
$link = mysqli_connect($host, $user, $password, $database) or die("Ошибка " . mysqli_error($link));
$query ='
CREATE TEMPORARY TABLE foo AS SELECT * FROM texts WHERE id = 465;
UPDATE foo SET id = 837, html_text = "text", text_lang = "russian";
INSERT INTO texts SELECT * FROM foo;
DROP TABLE foo;
';
$result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
<?php global $wp_query;
$wp_query = new WP_Query(array(
'posts_per_page' => '10',
'post_type' => 'post',
'category__in' => '1', //дочерние будут проигнорированы
'paged' => get_query_var('paged') ?: 1 // страница пагинации
));
while( have_posts() ) { the_post(); ?>
<article class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post__info">
<span class="post__info--date"><?php echo get_the_date(); ?></span>
<span class="post__info--comments"><a href="<?php the_permalink(); ?>#comments">комментировать</a></span>
</div>
<?php the_content(); ?>
<p class="post__hashtag"><?php the_tags($before=""); ?></p>
</article>
<?php wp_reset_postdata(); // reset the query ?>
<?php } ?>