<?php get_header(); ?>
<?php global $theme_breadcrumb_always_displayed; ?>
    <div class="container main-content-wrap">
        <ul class="breadcrumb">
            <?php display_bc($theme_breadcrumb_always_displayed ? 1 : $post->post_parent); ?>
        </ul>

        <header class="header page-title">
            <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'freshopio' ), get_search_query() ); ?></h1>
        </header>

        <div class="margin-top">
            <div class="row">
                <div class="col-md-12">
                    <section id="content" role="main">
                        <?php get_search_form(); ?>
                        <hr/>
                        <?php if ( have_posts() ) { ?>
                            <?php while ( have_posts() ) : the_post(); ?>
                            <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                                <section class="entry-content">
                                    <h2><a href="<?= the_permalink() ?>" title="<?= the_title_attribute(); ?>"><?= the_title(); ?></a></h2>
                                    <div class="search-post-excerpt"><?= get_the_excerpt(); ?></div>
                                </section>
                            </article>
                            <?php endwhile; ?>
                            <?php the_posts_navigation(); ?>
                        <?php } else { ?>
                            <article id="post-0" class="post no-results not-found">
                                <header class="header">
                                    <h2 class="entry-title"><?php _e( 'Nothing Found', 'freshopio' ); ?></h2>
                                </header>
                            </article>
                        <?php } ?>
                    </section>
                </div>
            </div>
        </div>
    </div>
<?php get_footer(); ?>