• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Display Headline & Intro Text on 1st Page of Archive Only

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.

headline-intro-text

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.

Related Code

  • Display Intro Text on 1st Page of Archive Only
  • Remove Archive Title Without Removing The Description
  • Code To Remove Title & Description From Archive Pages in Genesis

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.