<div class="container">
    <div class="row">
        <div class="col-xs-12">
            <?php if (have_posts()) : ?>
                <?php while (have_posts()) : the_post(); ?>
                    <article class="post">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <h3 class="post-title"><a href="<?php the_permalink() ?>" class="transicion"><?php the_title(); ?></a></h3>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <a href = "<?php the_permalink(); ?>">
                                        <?php if (has_post_thumbnail()) : ?>
                                            <?php the_post_thumbnail('blog_image', array('class' => "link imageborder img-responsive")); ?>
                                        <?php else: $url = get_stock_feature_url(); ?>
					<img src = "<?php echo $url; ?>" class="link img-responsive imageborder" alt="No image">
                                        <?php endif; ?>
					</a>
                                    </div>
                                    <div class="excerpt col-lg-6">
					<?php the_excerpt() ?>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <div class="row">
                                    <div class="col-lg-10 col-md-9 col-sm-8">
                                        <i class="fa fa-clock-o"></i> <?php the_time(get_option('date_format')); ?> 
                                        <i class="fa fa-user"></i> <a href="#"><?php the_author(); ?></a> 
                                        <i class="fa fa-folder-open"></i> <?php the_category(', '); ?>.
</a></h3>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <a href = "<?php 
        the_permalink();
        ?>
">
                                        <?php 
        if (has_post_thumbnail()) {
            ?>
                                            <?php 
            the_post_thumbnail('blog_image', array('class' => "link imageborder img-responsive"));
            ?>
						<?php 
        } else {
            $url = get_stock_feature_url();
            ?>
                                            <img src="<?php 
            echo $url;
            ?>
" class="link img-responsive imageborder" alt="No image">
                                        <?php 
        }
        ?>
					</a>
					
                                    </div>
                                    <div class="col-lg-6">
                                        <?php 
        echo content(100);
        ?>
                            <?php endif; ?>
                            <?php wp_reset_postdata(); ?>


			<?php $the_query = new WP_Query($args); ?>
                            <?php if ($the_query -> have_posts()) : ?>
                                <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
					<div class = "col-md-6">
					<?php if (has_post_thumbnail()) : ?>
						<a href="<?php the_permalink(); ?>">
                                        	<?php the_post_thumbnail('medium', array('class' => "img-responsive imageborder link")); ?>
						</a>
						<br>
                                     <?php else: ?>
					<a href="<?php the_permalink(); ?>">
					<img src="<?php echo get_stock_feature_url('medium'); ?>" class="img-responsive imageborder link" alt="No image">
					</a>
                                     <?php endif; ?>		
					</div>	
					</div>
					
                                <?php endwhile;?>
                            <?php endif; ?>
                            <?php wp_reset_postdata(); ?>

                        </div>
                    </div>
                </div>

            <?php endif; ?>
        </div> <!-- row -->
    public static function widget($args)
    {
        ?>

         <div class="block">
            <ul class="nav nav-tabs nav-tabs-ar" id="myTab2">
		<li class = "active"><a href="#other" data-toggle="tab"><i class="fa fa-archive"></i></a></li>
                <li><a href="#categories" data-toggle="tab"><i class="fa fa-folder-open"></i></a></li>
                <li><a href="#archive" data-toggle="tab"><i class="fa fa-clock-o"></i></a></li>
		<li><a href = "#tags" data-toggle = "tab"><i class = "fa fa-tags"></i></a></li>
            </ul>
		<div class = "tab-content">
                <div class = "tab-pane active" id = "other">
		
			<h3 class = "post-title"><?php _e('From the Archive', 'artificial_reason') ?></h3>
			
			<table>
			<?php $args = array('posts_per_page' => '3',
			'orderby' => 'rand');	
			$posts = get_posts($args);
			global $post;
			foreach($posts as $post): 
				setup_postdata($post);?>
				<tr>
				<td class = "wide">
				<a href = "<?php the_permalink(); ?>">
				<?php if (has_post_thumbnail($post->ID)) :
					$info = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>
					<img src = "<?php  echo $info; ?>" class = "img-responsive imageborder link" width = "100" height = "100">
				<?php else: 
					$url = get_stock_feature_url('thumbnail'); ?>
					<img src="<?php echo $url; ?>" class="img-responsive imageborder link" alt="No image" width = "100" height = "100">
				<?php endif; ?>
				</a>
				</td>
				<td>
				<a href = "<?php the_permalink(); ?>"><?php the_title(); ?></a>
				<br>
				<?php the_date(); ?>
				</td>
				</tr>
				
			<?php endforeach; ?> 
                
                </table>
		</div>


		<div class="tab-pane" id="archive">
                     <h3 class="post-title"><?php _e('Archives', 'artificial_reason') ?></h3>
                    <ul class="simple">
                        <?php wp_get_archives( $args ); ?>
                    </ul>
                </div>

                <div class="tab-pane" id="categories">
                    <h3 class="post-title"><?php _e('Categories', 'artificial_reason') ?></h3>
                    <ul class="simple">
                        <?php wp_list_categories('title_li='); ?>
                    </ul>
                </div>
		
		<div class="tab-pane" id="tags">
                    <h3 class="post-title"><?php _e('Tags', 'artificial_reason') ?></h3>
                    <div class="tags-cloud">
                        <?php
                            $args = array(
                                'smallest'                  => 1, 
                                'largest'                   => 1,
                                'unit'                      => 'em', 
                                'number'                    => 45,  
                                'format'                    => 'flat',
                                'separator'                 => ""
                            );

                            wp_tag_cloud($args);
                        ?>
                    </div>
                </div>

                
            </div> <!-- tab-content -->
        </div>

        <?php
    }
<div class="container">
    <div class="row">
        <div class="col-xs-12">
            <?php if (have_posts()) : ?>
                <?php while (have_posts()) : the_post(); ?>
                    <article class="post">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <h3 class="post-title"><a href="<?php the_permalink() ?>" class="transicion"><?php the_title(); ?></a></h3>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <a href = "<?php the_permalink(); ?>">
                                        <?php if (has_post_thumbnail()) : ?>
                                            <?php the_post_thumbnail('blog_image', array('class' => "link imageborder img-responsive")); ?>
                                        <?php else: 
						$info = get_stock_feature_url();?>
                                            <img src="<?php echo $info; ?>" class="link img-responsive imageborder" alt="No image">
                                        <?php endif; ?>
					</a>
                                    </div>
                                    <div class="excerpt col-lg-6">
					<?php the_excerpt() ?>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <div class="row">
                                    <div class="col-lg-10 col-md-9 col-sm-8">
                                        <i class="fa fa-clock-o"></i> <?php the_time(get_option('date_format')); ?> 
                                        <i class="fa fa-user"></i> <a href="#"><?php the_author(); ?></a> 
                                        <i class="fa fa-folder-open"></i> <?php the_category(', '); ?>.