Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div class="<?php the_title(); ?>-page">
- <?php
- $albumlist = get_terms('albums');
- foreach($albumlist as $albums) {
- $albums = $albums->name;
- $args = new WP_Query(array('posts_per_page' => -1, 'orderby' => title, 'albums' => $albums));
- ?>
- <div class="entrytext">
- <div id="photos">
- <?php $photoquery = new WP_Query($args);
- while ($photoquery->have_posts()):
- $photoquery->the_post(); ?>
- <?php if (has_post_thumbnail($post->ID)): ?>
- <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail'); ?>
- <article class="photo">
- <div class="featuredimage" style="background-image: url('<?php echo $image[0]; ?>')"></div>
- </article> <!-- .photo -->
- <?php
- else: ?>
- <?php
- endif; ?>
- <?php
- endwhile; ?>
- </div> <!-- #photos -->
- </div> <!-- entrytext -->
- <?php wp_reset_query(); ?>
- <?php rewind_posts(); ?>
- <?php
- } // End foreach %albums
- ?>
- </div> <!-- "title"-page -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement