query_posts( $args );
while ( have_posts() ) {
the_post();
the_title(); // вывести название
the_content();
}
$id = get_queried_object_id();
echo ('id');
echo $id;
$content;
$posts = get_posts();
foreach ( $posts as $post ):
echo ('foreach');
if ($post->ID==$id)
{
echo ('if true');
$content=$post->content;
}
else echo ('if false');
endforeach;
echo $content;