Answer the question
In order to leave comments, you need to log in
How to display a post in a Wordpress modal window?
Good day.
there is a wordpress loop like this
<div class="container cat_cocktails">
<div class="row">
<?php if ( have_posts() ) : ?>
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-sm-2 cat_post_div" style="background-color:<?php echo do_shortcode('[types field="background_post"][/types]'); ?>;">
<div class="row title_cat">
<?php the_title(); ?>
</div>
<div class="row cat_post_img">
<?php if ( has_post_thumbnail()) {the_post_thumbnail('full',array("class"=>"thumb_cat"));} ?>
</div>
<div class="row cat_buttom_post">
<a href="#" style="color:#fff; text-decoration:none"> more</a>
</div>
<div class="modal_window" style="display:none;">
<?php the_content(); ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question