Created
October 17, 2013 21:38
-
-
Save hsquareweb/7032648 to your computer and use it in GitHub Desktop.
WP: Query by Post Type (Ex: Branding Area)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="branding"> | |
| <?php $loop = new WP_Query(array('post_type' => 'brandingArea', 'orderby'=> 'ASC')); while ( $loop->have_posts() ) : $loop->the_post(); ?> | |
| <div> | |
| <img src="<?php the_field('image'); ?>" alt="" class="slide-background"/> | |
| <div class="slide-content"> | |
| <h1><?php the_title(); ?>:</h1> | |
| <p><?php the_field('text'); ?> <a href="<?php the_field('link'); ?>" class="more" title="<?php the_title(); ?>">Learn More</a></p> | |
| </div> | |
| </div> | |
| <?php endwhile; ?> | |
| </div><!-- end branding --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment