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">
     '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>

<?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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.