-
-
Save freezvd/04f07a727fa8b1edbd78 to your computer and use it in GitHub Desktop.
Add CCS id and class to....
This file contains hidden or 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 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