File "index.php"

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

<?php 
$renax_options = get_option('renax');
get_header();
?>
<!-- Header Banner -->
<section class="banner-header section-padding bg-img" data-overlay-dark="5" <?php if(!empty(Renax_AfterSetupTheme::return_thme_option('blog_background','url'))) { ?>data-background="<?php echo esc_url(Renax_AfterSetupTheme::return_thme_option('blog_background','url'));?>"<?php } ;?>>
    <div class="v-middle">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <?php if(!empty($renax_options['blog_sub_title'])) { ?>
					<<?php renax_index_subtitle_tag();?> class="rx-df-page-banner-subtitle"><?php echo esc_html(Renax_AfterSetupTheme::return_thme_option('blog_sub_title',''));?></<?php renax_index_subtitle_tag();?>>
					<?php } ;?>
                    <?php if(!empty($renax_options['blogtitle'])) { ?>
						<<?php renax_index_title_tag();?> class="rx-df-page-banner-title"><?php echo do_shortcode(Renax_AfterSetupTheme::return_thme_option('blogtitle',''));?></<?php renax_index_title_tag();?>>
					<?php } else { ?>
						<<?php renax_index_title_tag();?> class="rx-df-page-banner-title"><?php esc_html_e('Blog','renax');?></<?php renax_index_title_tag();?>>
					<?php } ;?>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- divider line -->
<div class="line-vr-section"></div>
<!-- Blog -->
<section class="blog2 section-padding">
    <div class="container">
        <div class="row">
            <div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>col-lg-8 col-md-12 <?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>
                <!-- Pagination -->
                <?php if (function_exists("renax_pagination")) {
					renax_pagination($wp_query->max_num_pages);
				}; ?>
				<div class="hidden"><?php the_tags(); next_posts_link(); previous_posts_link();wp_link_pages();comment_form();paginate_comments_links();previous_comments_link(); wp_enqueue_script('comment-reply'); the_post_thumbnail();?></div>
            </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 get_footer(); ?>