| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /**
- * The template for displaying search results pages.
- *
- * @package WordPress
- * @subpackage Taskereasy
- * @since Taskereasy 1.0
- */
- get_header();
- taskereasy_blog_banner();
- ?>
- <div id="primary" class="content-area">
- <main id="main" class="site-main">
- <div class="container">
- <div class="section-padding">
- <?php if ( have_posts() ) : ?>
- <header class="page-header">
- <h3 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'taskereasy' ), get_search_query() ); ?></h3>
- </header><!-- .page-header -->
- <div class="row">
- <?php
- // Start the loop.
- while ( have_posts() ) : the_post(); ?>
- <div class="col-md-6">
- <article <?php post_class('post-container grid-style'); ?>>
- <?php if(has_post_thumbnail()){ ?>
- <div class="post-thumbnail">
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a>
- </div>
- <?php } ?>
- <div class="post-meta">
- <ul>
- <li><?php echo esc_html__('By:', 'taskereasy') ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a></li>
- <li><a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a></li>
- <?php the_category(); ?>
- </ul>
- </div>
- <h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <div class="excerpt"><?php echo taskereasy_custom_excerpt_length(19); ?></div>
- <a href="<?php the_permalink(); ?>" class="btn"><?php echo esc_html__ ('Read More', 'taskereasy'); ?> <i class="fa fa-angle-right"></i></a>
- </article>
- </div>
- <?php
- // End the loop.
- endwhile; ?>
- <?php // Previous/next page navigation.
- the_posts_pagination( array(
- 'prev_text' => esc_html__( 'Previous page', 'taskereasy' ),
- 'next_text' => esc_html__( 'Next page', 'taskereasy' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'taskereasy' ) . ' </span>',
- ) );
- // If no content, include the "No posts found" template.
- else :
- get_template_part( 'template-parts/post/content', 'none' );
- endif;
- ?>
- </div>
- </div>
- </div>
- </main><!-- .site-main -->
- </div><!-- .content-area -->
- <?php get_footer(); ?>
|