File "search.php"

Full Path: /home/cabizcok/public_html/wp-content/themes/renax/search.php
File size: 5.1 KB
MIME-type: text/x-php
Charset: utf-8

<?php 
$renax_options = get_option('renax');
get_header();
?>
<?php $renax_options = get_option('renax'); ?>
<!-- Header Banner -->
<section class="banner-header section-padding bg-img" data-overlay-dark="5" <?php if(!empty(Renax_AfterSetupTheme::return_thme_option('search_post_back','url'))) { ?>data-background="<?php echo esc_url(Renax_AfterSetupTheme::return_thme_option('search_post_back','url'));?>"<?php } ;?>>
    <div class="v-middle">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <<?php renax_index_subtitle_tag();?> class="rx-df-page-banner-subtitle"><?php esc_html_e('Search','renax');?></<?php renax_index_subtitle_tag();?>>
					<<?php renax_index_title_tag();?> class="rx-df-page-banner-title"><?php printf( esc_html__( 'Results for: %s', 'renax' ), '<span>"' . get_search_query() . '"<span>' ); ?></<?php renax_index_title_tag();?>>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- divider line -->
<div class="line-vr-section"></div>
<!-- Blog 2 -->
<?php if(have_posts()) { ?>
<section class="blog2 section-padding">
    <div class="container">
        <div class="row">
            <div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>col-md-8 <?php if (Renax_AfterSetupTheme::return_thme_option('index_page_style_opt')=='st2'){ ?>order-md-last<?php } ;?> <?php } else { ?>col-md-12<?php } ;?>">
                <div class="row">
					<?php global $post, $post_id;?>
					<?php while ( have_posts() ) : the_post();?>
					<div id="post-<?php the_ID(); ?>" <?php post_class('col-md-12'); ?>>
                        <div class="item">
                            <?php if (has_post_thumbnail( $post->ID ) ) { ?>
							<?php $renax_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), '' );?>
							<div class="post-img">
                                <a href="<?php the_permalink();?>"> <img src="<?php echo esc_url($renax_image[0]);?>" alt="<?php the_title_attribute ();?>"> </a>
                            </div>
							<?php } ;?>
                            <div class="post-cont"> 
								<?php if( has_category() ) { ?>
								<?php $renax_category = wp_get_post_terms($post->ID,'category');?>
								<?php foreach ($renax_category as $renax_item) { ?>
								<span class="category"><a href="<?php echo esc_url(get_category_link($renax_item->term_id));?>"><?php echo esc_html($renax_item->name . '  ');?></a></span> 
								<?php } } ;?>
								<span class="calendar"><a href="<?php the_permalink();?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
								<h5><a href="<?php the_permalink();?>"><?php the_title();?></a></h5>
								<?php if( wp_link_pages('echo=0') ) { ?>
								<?php the_content();
								wp_link_pages( array(
									'before'      => '<div class="page-links">',
									'after'       => '</div>',
									'link_before' => '<span>',
									'link_after'  => '</span>',
									'pagelink'    => '%',
									'separator'   => '',
								) );
								?>
								<?php } else {  ?>
                                <?php the_excerpt();?>
								<?php } ;?>
								<a href="<?php the_permalink();?>" class="button-1"><?php esc_html_e('Read More','renax');?></a>
                            </div>
                        </div>
                    </div>
					<?php endwhile; ?>
					<?php wp_reset_postdata();?>
                </div>
				<?php if (function_exists("renax_pagination")) {
					renax_pagination($wp_query->max_num_pages);
				} ?>
            </div>
			<?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>
			<div class="col-lg-4 col-md-12 <?php if (Renax_AfterSetupTheme::return_thme_option('index_page_style_opt')=='st2'){ ?>order-md-first<?php } ;?>">
				<div class="blog2-sidebar row">
					<?php dynamic_sidebar( 'sidebar-1' ); ?>
				</div>
			</div>
			<?php } ;?>
        </div>
    </div>
</section>
<?php } else { ?>
<!-- Search Result -->
<section class="not-found section-padding">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-6 col-md-12 text-center">
                <div class="section-subtitle"><?php esc_html_e('Sorry We Can not Find That Page!','renax');?></div>
                <div class="section-title"><?php esc_html_e('Nothing Found!','renax');?></div>
				<p><?php esc_html_e('The page you are looking for was moved, removed, renamed or never existed.','renax');?></p>
                <div class="search-form">
                    <form action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get">
                        <div class="form-group clearfix">
                            <input type="search" name="s" placeholder="<?php esc_attr_e('Search here','renax');?>" required>
                            <button type="submit" class="search-button"><span class="ti-search"></span></button>
                        </div>
                    </form>
                </div>
			</div>
        </div>
    </div>
</section>
<div class="line-vr-section"></div>
<?php } ;?>
<?php get_footer(); ?>