Skip to content

Instantly share code, notes, and snippets.

@esmyth01
Created December 12, 2015 03:20
Show Gist options
  • Save esmyth01/1742c913f193c2e7a979 to your computer and use it in GitHub Desktop.
Save esmyth01/1742c913f193c2e7a979 to your computer and use it in GitHub Desktop.
<div class="home-cta-content">
<img src="<?php bloginfo('template_directory'); ?>/images/objective(purple).png" alt="mission" class="home-cta-image"/>
<?php $query = new WP_Query( array( "post_name" => "mission", "post_type" => "page" )); ?>
<?php if ($query->have_posts()) : while($query->have_posts()) : $query->the_post(); //start loop ?>
<?php the_title(); ?>
<?php endwhile; endif; //end loop?>
<?php wp_reset_postdata() ?>
<?php echo '<pre>'; var_dump($query); echo '</pre>'; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment