<?php  get_header(); ?>
    <body>

        <header class="header-interior">
            <section class="header-items">
                <span class="logo">
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
                        <?php the_custom_logo(); ?>
                    </a>
                </span>

                <section class="search">
                    <?php echo get_search_form(); ?>
                </section>
            </section>
        </header>

        <section class="blog-text">
            <h1>Resultado de la busqueda para: '<?=get_search_query()?>'</h1>
        </section>

        <main>
            <section class="articles">
                <?php if ( have_posts() ) : 
                    while ( have_posts() ) : the_post(); 
                ?>
                    <article class="single-post">
                        <figure>
                            <a href="<?=the_permalink()?>" title="<?=the_title()?>"></a>
                            <?php if(has_post_thumbnail()) {
                                    the_post_thumbnail( 'post-thumbnails');
                                }
                            ?>
                        </figure>
                        <section class="post-data">
                            <h3>
                                <a href="<?=the_permalink()?>"><?=the_title()?></a>
                            </h3>
                            <p>
                                <?=substr(get_the_excerpt(), 0,110)?>...
                            </p>
                        </section>
                    </article>
                <?php endwhile; ?>

                <?php else: ?>

                <?php endif; ?>
            </section>
        </main>

        <?php get_footer(); ?>

    <?php wp_footer(); ?>

    </body>
</html>
