Last active
August 29, 2015 14:11
-
-
Save tomharrigan/482be6485bb113b44a4b to your computer and use it in GitHub Desktop.
Enable Infinite Post Transporter in Genesis
This file contains 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
add_action( 'init', 'metro_pro_infinite_transporter_init' ); | |
function metro_pro_infinite_transporter_init() { | |
add_theme_support( 'infinite-transporter', array( | |
'container' => 'main-content', | |
'footer' => false, | |
'render' => 'genesis_render' | |
) ); | |
} | |
function genesis_render() { | |
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' ); | |
echo '</div>'; | |
do_action( 'genesis_after_entry_content' ); | |
do_action( 'genesis_entry_footer' ); | |
echo '</article>'; | |
comments_template( '', true ); | |
endwhile; //* end of one post | |
else : //* if no posts exist | |
do_action( 'genesis_loop_else' ); | |
endif; //* end loop | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment