generate_page_header_id

The generate_page_header_id allows you to change the Page Header ID based on selected conditions.

So you can write your conditionals to select a certain post or set of posts, and change the ID to a specific Page Header.

Usage

For example, if we want assign a page header to author pages:

add_filter( 'generate_page_header_id', function( $id ) {
	if ( is_author() ) {
	 	return 17686; // ID of the Page Header to use.
	}
  
  	return $id;
} );

or assign a page header to date archives:

add_filter( 'generate_page_header_id', function( $id ) {
	if ( is_archive() ) {
	 	return 17686; // ID of the Page Header to use.
	}
  
  	return $id;
} );