Search result page
-
Greetings!
The problem follows. When you enter a search query in the form, throws on page 404 “page not found”.
How fix this problem?search.php content
<?php printf( __( ‘Result: %s’, ‘twentyten’ ), ” . get_search_query() . ” ); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?><div class=”category-text”>
<h3 class=”entry-header”>“><?php the_title(); ?></h3>
<div class=”date”><?php the_time(‘F j, Y’); ?></div>
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<div class=”pagination”><?php
global $wp_query;
$big = 999999999;
echo paginate_links( array(
‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ),
‘format’ => ‘?paged=%#%’,
‘current’ => max( 1, get_query_var(‘paged’) ),
‘type’ => ‘list’,
‘prev_text’ => __(‘? ‘),
‘next_text’ => __(‘?’),
‘total’ => $wp_query->max_num_pages
) );
?></div>
- The topic ‘Search result page’ is closed to new replies.