How to WordPress implement the open record in a modal window?

All, Hello. The client has a ready-made website on wordpress, he decided to alter the blog page and for a basis decided to take the website of the President of Russia. That is, he wants on the big screens each entry from the blog open in a PopUp window. How to implement it?

Solved the problem myself!
Solution:
<div class="list-posts">
<?php
 $recent = new WP_Query("cat=2");
 while($recent--->have_posts()) : $recent->the_post();
?>
 <div id="<?php the_ID() ?>" class="post-link" style="background: url(<?php $thumb_id = get_post_thumbnail_id(); $uploaded = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true); echo $uploaded[0]; ?>)">
 <h3 class="post-title"><?php the_title() ?></h3>
</div>
 <?php endwhile; ?>
 </div>

Here, I get a list of posts from specified topics!
Click on the record get the record id and the Ajax loading the post content from the rest api
$(".post-link").on("click", function(){
$(".post-preloader").addClass("is-active")
$(".post-content").empty();
 PostId = $(this).attr("id");
$(".post-data").addClass("is-active")
 $.get("http://site.com/wp-json/wp/v2/posts/" + PostId, function (data) {
$(".post-preloader").removeClass("is-active")
 $(".post-data .post-title").text(data.title.rendered);
 $.get("http://site.com/wp-json/wp/v2/media/"+ data.featured_media, function (img) {
 $(".post-img").attr("src", img.source_url);
});
$(".post-content").append(data.content.rendered)
})
 });
August 19th 19 at 23:06
1 answer
August 19th 19 at 23:08
In the cycle of the output of the add block with information and the necessary css properties, add display:none; on click, change display:block; well or use bootstrap modal
Thank you for the answer! Probably you have not correctly understood. In any case I already solved the problem. - Reta_Quigley commented on August 19th 19 at 23:11

Find more questions by tags PHPWordPress