• My search.php looks like this:

    <?php
    /**
    * The template for displaying Search Results pages.
    *
    * @package WordPress
    * @subpackage OneSocial Theme
    * @since OneSocial Theme 1.0.0
    */
    get_header();
    ?>

    <div id=”primary” class=”site-content”>

    <header class=”page-header dir-header”>
    <h1 class=”page-title”><?php printf( __( ‘Search Results for: %s’, ‘onesocial’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>
    </header>

    <div id=”content” role=”main” class=”search-content-wrap”>

    <section class=”search-content”>

    <?php if ( have_posts() ) : ?>

    <div class=”search-content-inner”>

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( ‘template-parts/content’, get_post_format() ); ?>
    <?php endwhile; ?>

    </div>

    <div class=”pagination-below”>
    <?php buddyboss_pagination(); ?>
    </div>

    <?php else : ?>

    <?php get_template_part( ‘template-parts/content’, ‘none’ ); ?>

    <?php endif; ?>

    </section>

    <?php
    if ( is_active_sidebar( ‘search’ ) ) {
    get_sidebar();
    }
    ?>

    </div>

    </div>

    <?php

    get_footer();

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mikko Saari

    (@msaari)

    No problems there. Do you have an index? Is the search results page completely empty, or just “No results found”? Are you using Yoast Local SEO?

    I’m having this same issue. I’m getting “No results found”. I do have Yoast SEO, but I deactivated it and tested the search and still got no results.

    Just reindexed via the plugin dashboard and that fixed the problem!

    My search.php looks like this. I’m getting “No results found” after putting a query in search box.

    <?php get_header(); ?>
    <div class=”site-content wrap” id=”reviews”>
    <h1 class=”post-title”><?php aazon_get_string( ‘str_31’ ); ?></h1>
    <main class=”content” id=”result-items” role=”main”>
    <div class=”pagination”>
    <div class=”total_post subtitle”><?php echo $wp_query->found_posts; ?> <?php aazon_get_string( ‘str_30’ ); ?></div>
    <?php aazon_blog_paging(); ?>
    <div class=”clearfix”></div>
    </div><!– .pagination –>
    <div class=”result-inner”>
    <?php
    if( have_posts()): while( have_posts()): the_post();
    get_template_part( ‘content’, ‘review’ );
    endwhile; wp_reset_postdata(); ?>

    <?php else : ?>
    <?php get_template_part( ‘content’, ‘none’ ); ?>
    <?php endif; ?>
    </div>
    <div class=”clearfix”></div>
    <?php aazon_blog_paging(); ?>
    <div class=”clearfix”></div>
    </main>

    <div class=”clearfix”></div>
    </div><!– #reviews –>
    <?php get_footer(); ?>

    Plugin Author Mikko Saari

    (@msaari)

    No problems in that search template, but please start a new thread, following updates to these older posts can be difficult.

    I’m really sorry for the inconvenience. I’ve created a new thread as per your suggestion.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search Results page empty’ is closed to new replies.