Skip to content

Instantly share code, notes, and snippets.

@srikat
Created October 24, 2013 19:46
Show Gist options
  • Save srikat/7143767 to your computer and use it in GitHub Desktop.
Save srikat/7143767 to your computer and use it in GitHub Desktop.
//* Add a CSS ID to main element
add_filter( 'genesis_attr_content', 'custom_attributes_content' );
function custom_attributes_content( $attributes ) {
if ( is_home() || is_archive() ) {
$attributes['id'] = 'main-content-area';
}
return $attributes;
}
//* Add support for Jetpack infinite scroll
add_theme_support( 'infinite-scroll', array(
// 'type' => 'click',
'container' => 'main-content-area',
'render' => 'genesis_do_loop'
) );
//* Remove archive pagination
// add_action ( 'genesis_after_entry', 'sk_remove_pagination' );
function sk_remove_pagination() {
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment