permalinks - how to link post-thumbnail to original img in a lightbox?

admin2025-06-03  2

I have a page showing custom post type, but I don't know how to link to the full size image that can be opened by a lightbox plugin.

the post page is like:

 <div class="content" id="main-content">
<?php
  $args=array(
     'post_type' => 'painting',
    );
  $the_query = new WP_Query($args);
  ?>

  <?php if ($the_query->have_posts() ): while ($the_query->have_posts() ):$the_query->the_post(); ?>

<div class="painting col-md-3 col-sm-6" id="inside">
    <div class="painting-image">
        <?php the_post_thumbnail('painting-thumbnail'); ?>
        <span class="overlay"></span>
    </div>
</div>

<?php endwhile; ?>
<?php endif; ?>

I know I should use something in an {a} tag, but I don't find how to link to the source. I've also read the wp codex on 'wp_get_attachment_image_src', but it wasn't helpful. Thanks for further help!

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748887477a314549.html

最新回复(0)