Skip to content

Instantly share code, notes, and snippets.

@seb86
Last active September 12, 2018 15:33
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 seb86/3c42c0877ac499e8412277d75e355d4b to your computer and use it in GitHub Desktop.
Save seb86/3c42c0877ac499e8412277d75e355d4b to your computer and use it in GitHub Desktop.
Declare support for Auto Load Next Post in a theme. Last two values are for Auto Load Next Post v1.5.0+ only!
/**
* Add theme support for Auto Load Next Post by setting the
* theme selectors to be applied once the theme is activated.
*/
function add_alnp_theme_support() {
add_theme_support( 'auto-load-next-post', array(
'content_container' => 'main.site-main',
'title_selector' => 'h1.entry-title',
'navigation_container' => 'nav.post-navigation',
'comments_container' => 'div#comments',
'load_js_in_footer' => 'no',
'lock_js_in_footer' => 'no',
) );
}
add_action( 'after_setup_theme', 'add_alnp_theme_support' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment