Support » Theme: Flat » Search is not working

  • Hi,
    Search is not working in flat theme. And search result is going to blog instead of results/home.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Alexandra

    (@alexandrastan001)

    ThemeIsle Support

    Hello,

    Can you share the link to your website so that i can take a look?

    Best regards,
    Alexandra

    http://dd5.7e3.myftpupload.com/

    Please check it

    Thanks

    Alexandra

    (@alexandrastan001)

    ThemeIsle Support

    Hello,

    I checked your website but this is not our product. Your product is called Flat theme. Our products if called Flat and that’s all.
    Try contacting their forum.

    Best regards,
    Alexandra

    Hello,

    I am using theme named “flat”. Facing a issue related to search. Search is not working when I write multiple words like “issue tracker”. For one word it is working fine like “issue” or “tracker”. Code of searchform.php file is :

    <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
            <label for="s" class="assistive-text"><?php _e( 'Search', 'flat' ); ?></label>
            <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'flat' ); ?>" />
            <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'flat' ); ?>" />
        </form>

    and search.php file is :

    <?php get_header(); ?>
    
    <?php flat_hook_search_before(); ?>
        <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'flat' ), get_search_query() ); ?></h1>
        <div id="content" class="site-content" role="main">
            <?php flat_hook_search_top(); ?>
    
        <?php if ( have_posts() ) : ?>
    
            <?php while ( have_posts() ) : the_post(); ?>
                <?php get_template_part( 'content', get_post_format() ); ?>
            <?php endwhile; ?>
            <?php the_posts_pagination( array( 'prev_text' => __( '<i class="fa fa-chevron-left"></i>', 'flat' ), 'next_text' => __( '<i class="fa fa-chevron-right"></i>', 'flat' ) ) ); ?>
        <?php else : ?>
            <?php get_template_part( 'content', 'none' ); ?>
        <?php endif; ?>
    
            <?php flat_hook_search_bottom(); ?>
        </div>
        <?php flat_hook_search_after(); ?>
    <?php get_footer(); ?>

    Previously it was working on my local setup, but now it is not working on my live version.

    Please suggest a solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search is not working’ is closed to new replies.