The 1st code snippet in this tutorial removes both the archive headline & archive intro text from all paginated archive pages so the headline and intro text only displays on the first page of archives.
Using a code editor, add either of the following code snippets to the end of your child themes functions file.
add_action( 'genesis_before_loop', 'remove_archive_headline', 14 );
function remove_archive_headline() {
if ( ! get_query_var( 'paged' ) >= 2 )
return;
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
}
The 2nd code snippet removes the archive intro text only ( Not the archive title ) from all paginated archive pages excluding the 1st page of the archive.
add_filter( 'genesis_term_intro_text_output','archive_intro_text', 10, 3 );
function archive_intro_text( $intro_text ) {
if ( get_query_var( 'paged' ) >= 1 )
return;
return $intro_text;
}
The 2nd code snippet uses get_query_var with the PHP comparison operator for greater than or equal to.
Leave a Reply