Skip to content

Instantly share code, notes, and snippets.

@lizkaraffa
Created January 12, 2016 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizkaraffa/5cece180358709df1c2b to your computer and use it in GitHub Desktop.
Save lizkaraffa/5cece180358709df1c2b to your computer and use it in GitHub Desktop.
Changed home template to include programs
<?php $pageOne = get_theme_mod( 'page_one', '2' ); $pageTwo = get_theme_mod( 'page_two', '2' ); $pageThree = get_theme_mod( 'page_three', '2' ); ?>
<?php if ( 'false' == ( $pageOne ) || '' != ( $pageOne ) && 'false' == ( $pageTwo ) || '' != ( $pageTwo ) && 'false' == ( $pageThree ) || '' != ( $pageThree ) ) { ?>
<!-- BEGIN .row -->
<div class="row featured-pages">
<!-- BEGIN .content -->
<div class="content">
<!-- BEGIN .sixteen columns -->
<div class="sixteen columns">
<!-- BEGIN .postarea full -->
<div class="postarea full">
<?php if ( 'false' == ( $pageOne ) || '' != ( $pageOne ) ) { ?>
<?php $recent = new WP_Query(array('post_type' => 'program', 'the_ID' => get_theme_mod('page_one', '2') ) ); ?>
<?php if ($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post(); ?>
<?php get_template_part( 'content/program', 'featured' ); ?>
<?php endwhile; endif; ?>
<?php } ?>
<?php if ( 'false' == ( $pageTwo ) || '' != ( $pageTwo ) ) { ?>
<?php $recent = new WP_Query(array('post_type' => 'program', 'the_ID' => get_theme_mod('page_two', '2') ) ); ?>
<?php if ($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post(); ?>
<?php get_template_part( 'content/program', 'featured' ); ?>
<?php endwhile; endif; ?>
<?php } ?>
<?php if ( 'false' == ( $pageThree ) || '' != ( $pageThree ) ) { ?>
<?php $recent = new WP_Query(array('post_type' => 'program', 'the_ID' => get_theme_mod('page_three', '2') ) ); ?>
<?php if ($recent->have_posts()) : while($recent->have_posts()) : $recent->the_post(); ?>
<?php get_template_part( 'content/program', 'featured' ); ?>
<?php endwhile; endif; ?>
<?php } ?>
<!-- END .postarea full -->
</div>
<!-- END .sixteen columns -->
</div>
<!-- END .content -->
</div>
<!-- END .row -->
</div>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment