Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 25, 2016 17:16
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 joshfeck/ae160f5b000ef70cb7b7 to your computer and use it in GitHub Desktop.
Save joshfeck/ae160f5b000ef70cb7b7 to your computer and use it in GitHub Desktop.
Event Espresso 4 People add-on post type archive template starter for a Genesis 2.0 child theme
<?php
remove_action ( 'genesis_loop', 'genesis_do_loop' ); // Remove the standard loop
add_action( 'genesis_loop', 'custom_people_do_loop' ); // Add custom loop
// Optional: Remove post meta
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
function custom_people_do_loop() {
if ( have_posts() ) :
do_action( 'genesis_before_while' );
while ( have_posts() ) : the_post();
do_action( 'genesis_before_entry' );
printf( '<article %s>', genesis_attr( 'entry' ) );
do_action( 'genesis_entry_header' );
do_action( 'genesis_before_entry_content' );
printf( '<div %s>', genesis_attr( 'entry-content' ) );
do_action( 'genesis_entry_content' );
// Include the post TYPE-specific template for the content.
espresso_get_template_part( 'content', 'espresso_people-details' );
echo '</div>';
do_action( 'genesis_after_entry_content' );
do_action( 'genesis_entry_footer' );
echo '</article>';
do_action( 'genesis_after_entry' );
endwhile; //* end of one post
do_action( 'genesis_after_endwhile' );
add_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
else : //* if no posts exist
do_action( 'genesis_loop_else' );
endif; //* end loop
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment