Skip to content

Instantly share code, notes, and snippets.

@JulioPotier
Created December 22, 2014 23:58
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 JulioPotier/0b967039693c4b666eef to your computer and use it in GitHub Desktop.
Save JulioPotier/0b967039693c4b666eef to your computer and use it in GitHub Desktop.
template comment paged for wordpress
add_filter( 'template_include', 'template_comment_paginated' );
function template_comment_paginated( $template )
{
if ( (int) get_query_var( 'cpage' ) > 0 &&
false !== ( $_template = str_replace( '.php', '-paged.php', $template ) ) &&
file_exists( $_template ) )
{
return $_template;
}
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment