Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw...
File: search.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The template for displaying search results pages
[2] Fix | Delete
*
[3] Fix | Delete
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
[4] Fix | Delete
*
[5] Fix | Delete
* @package WordPress
[6] Fix | Delete
* @subpackage Twenty_Twenty_One
[7] Fix | Delete
* @since Twenty Twenty-One 1.0
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
get_header();
[11] Fix | Delete
[12] Fix | Delete
if ( have_posts() ) {
[13] Fix | Delete
?>
[14] Fix | Delete
<header class="page-header alignwide">
[15] Fix | Delete
<h1 class="page-title">
[16] Fix | Delete
<?php
[17] Fix | Delete
printf(
[18] Fix | Delete
/* translators: %s: search term. */
[19] Fix | Delete
esc_html__( 'Results for "%s"', 'twentytwentyone' ),
[20] Fix | Delete
'<span class="page-description search-term">' . esc_html( get_search_query() ) . '</span>'
[21] Fix | Delete
);
[22] Fix | Delete
?>
[23] Fix | Delete
</h1>
[24] Fix | Delete
</header><!-- .page-header -->
[25] Fix | Delete
[26] Fix | Delete
<div class="search-result-count default-max-width">
[27] Fix | Delete
<?php
[28] Fix | Delete
printf(
[29] Fix | Delete
esc_html(
[30] Fix | Delete
/* translators: %d: the number of search results. */
[31] Fix | Delete
_n(
[32] Fix | Delete
'We found %d result for your search.',
[33] Fix | Delete
'We found %d results for your search.',
[34] Fix | Delete
(int) $wp_query->found_posts,
[35] Fix | Delete
'twentytwentyone'
[36] Fix | Delete
)
[37] Fix | Delete
),
[38] Fix | Delete
(int) $wp_query->found_posts
[39] Fix | Delete
);
[40] Fix | Delete
?>
[41] Fix | Delete
</div><!-- .search-result-count -->
[42] Fix | Delete
<?php
[43] Fix | Delete
// Start the Loop.
[44] Fix | Delete
while ( have_posts() ) {
[45] Fix | Delete
the_post();
[46] Fix | Delete
[47] Fix | Delete
/*
[48] Fix | Delete
* Include the Post-Format-specific template for the content.
[49] Fix | Delete
* If you want to override this in a child theme, then include a file
[50] Fix | Delete
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
[51] Fix | Delete
*/
[52] Fix | Delete
get_template_part( 'template-parts/content/content-excerpt', get_post_format() );
[53] Fix | Delete
} // End the loop.
[54] Fix | Delete
[55] Fix | Delete
// Previous/next page navigation.
[56] Fix | Delete
twenty_twenty_one_the_posts_navigation();
[57] Fix | Delete
[58] Fix | Delete
// If no content, include the "No posts found" template.
[59] Fix | Delete
} else {
[60] Fix | Delete
get_template_part( 'template-parts/content/content-none' );
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
get_footer();
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function