I'm having some trouble with WordPress to show images that belong to a certain post on another page. What I'm looking for is a homepage that lists all posts within a certain category and show the title, the excerpt and a 'view examples' link. The view examples link would show all images that belong to the post in a LightBox, but on the homepage.
So far I have this, but now I'm sort of stuck.
<?php query_posts('cat=15&order=DSC'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-md-6">
<div class="pakket-block">
<h3><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<span class="read_more"><a href="<?php the_permalink(); ?>" rel="shadowbox">View examples</a></span>
</div> <!-- /.pakket-block -->
</div> <!-- /.col-md-6 -->
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); // reset the query ?>