Skip to content

Instantly share code, notes, and snippets.

@alisonmf
Created February 4, 2011 02:53
Show Gist options
  • Save alisonmf/810667 to your computer and use it in GitHub Desktop.
Save alisonmf/810667 to your computer and use it in GitHub Desktop.
our people page
<?php
// Page Template Name: Culture / People
?>
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
<div id="people">
<h2>Our People</h2>
<h3>Account</h3>
<div id="accordion">
<?php //figured I'd run the loop again since I don't know wtf is going on ?>
<?php
$args=array(
'departments' => 'people-account',
'post_type' => 'people',
);
$my_query = null;
$my_query = new WP_Query($args);
if ( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
?><?php //the content ?>
<h4><a href="#"><?php the_title(); ?></a></h4>
<?php the_content(); ?>
<?php
endwhile;
}
wp_reset_query();
?>
</div>
<h3>Creative</h3>
<?php //hey why not run it a few more times? ?>
<?php
$args=array(
'departments' => 'people-creative',
'post_type' => 'people',
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
?><?php //the content ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php
endwhile;
}
wp_reset_query();
?>
</div><!-- /people -->
</div><!-- /content -->
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment