Instantly share code, notes, and snippets.

Embed
What would you like to do?
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