%2$s',
				get_avatar( get_the_author_meta( 'ID' ), 50 ),
				get_the_author()
			);
			/*
			 * Since we called the_post() above, we need to
			 * rewind the loop back to the beginning that way
			 * we can run the loop properly, in full.
			 */
			rewind_posts();
		}
		return $title;
	}
}
add_action( 'generate_after_archive_title', 'generate_do_archive_description' );
/**
 * Output the archive description.
 *
 * @since 2.3
 */
function generate_do_archive_description() {
	$term_description = get_the_archive_description();
	if ( ! empty( $term_description ) ) {
		if ( is_author() ) {
			printf( '%s
', $term_description ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		} else {
			printf( '%s
', $term_description ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		}
	}
	/**
	 * generate_after_archive_description hook.
	 *
	 * @since 0.1
	 */
	do_action( 'generate_after_archive_description' );
}
add_action( 'generate_before_loop', 'generate_do_search_results_title' );
/**
 * Add the search results title to the search results page.
 *
 * @since 3.1.0
 * @param string $template The template we're targeting.
 */
function generate_do_search_results_title( $template ) {
	if ( 'search' === $template ) {
		// phpcs:ignore -- No escaping needed.
		echo apply_filters(
			'generate_search_title_output',
			sprintf(
				'',
				generate_get_attr( 'page-header' ),
				sprintf(
					/* translators: 1: Search query name */
					__( 'Search Results for: %s', 'generatepress' ),
					'' . get_search_query() . ''
				)
			)
		);
	}
}