Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Resort Chains Custom Page
- */
- // Custom Loop - Featured Properties
- add_action( 'genesis_loop', 'resort_chains_loop' );
- function resort_chains_loop() {
- global $post;
- /* Arguments */
- $args = array(
- 'post_type' => 'resort_chains',
- 'posts_per_page' => '48',
- 'orderby' => 'name',
- 'order' => 'ASC',
- );
- $resort_chains_query = new WP_Query($args);
- if ( $resort_chains_query -> have_posts() ) :
- while ( $resort_chains_query -> have_posts() ) : $resort_chains_query -> the_post();
- ?>
- <div class="resort_thumbnails_outer"> <?php /* outer div of thumbnails of resorts on resort chains page */?>
- <div class="resort_thumbnails_first" id="resort_chains"> <?php /* first inner div */?>
- <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a> <?php /* grab the featured thumbnail image and make it a link */ ?>
- <div class="resort_thumbnail_caption"> <?php /* caption box */?>
- <span><?php the_title(); ?></span> <?php /* title text in caption box */?>
- </div> <?php /* resort_thumbnail_caption */?>
- </div> <?php /* resort_thumbnails_first */?>
- <p class="resort_features">Ideal for: <?php the_field('ideal_for_adults'); ?><?php the_field('ideal_for_families'); ?></p>
- </div> <?php /* resort_thumbnails_outer */?>
- <?php
- endwhile;
- echo '</div>'; // home_slider
- do_action ( 'genesis_after_endwhile' );
- endif;
- wp_reset_postdata();
- }
- add_action( 'genesis_loop', 'resort_chains_loop' );
- remove_action( 'genesis_loop', 'genesis_do_loop' );
- genesis();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement