-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
61 lines (61 loc) · 4 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php get_header(); ?>
<main class="container" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
<div class="row">
<div class="page-container col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="container p-0">
<div class="row">
<div class="title-container col-12">
<h1><?php single_cat_title(); ?></h1>
</div>
<?php if (have_posts()) : ?>
<section class="col-9">
<?php $defaultatts = array('class' => 'img-fluid', 'itemprop' => 'image'); ?>
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="archive-item col-12 <?php echo join(' ', get_post_class()); ?>" role="article">
<div class="container p-0">
<div class="row">
<picture class="col-5">
<?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('blog_img', $defaultatts); ?>
</a>
<?php else : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<img itemprop="image" src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/no-img.jpg" alt="No img" class="img-fluid" />
</a>
<?php endif; ?>
</picture>
<div class="col-7">
<header>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<h2 rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
</a>
<time class="date" datetime="<?php echo get_the_time('Y-m-d') ?>" itemprop="datePublished"><?php the_time('d-m-Y'); ?></time>
<span class="author" itemprop="author" itemscope itemptype="http://schema.org/Person"><?php _e('Publicado por:', 'streann_sdk'); ?> <?php the_author_posts_link(); ?></span>
</header>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" title="<?php _e('Leer Más', 'streann_sdk'); ?>" class="btn btn-md btn-dark"><?php _e('Leer Más', 'streann_sdk'); ?></a>
</div>
</div>
</div>
</article>
<?php endwhile; ?>
<div class="pagination col-12">
<?php if(function_exists('wp_paginate')) { wp_paginate(); } else { posts_nav_link(); wp_link_pages(); } ?>
</div>
</section>
<aside class="col-3 hidden-xs">
<?php get_sidebar(); ?>
</aside>
<?php else: ?>
<section>
<h2><?php _e('Disculpe, su busqueda no arrojo ningun resultado', 'streann_sdk'); ?></h2>
<h3><?php _e('Dirígete nuevamente al', 'streann_sdk'); ?> <a href="<?php echo home_url('/'); ?>" title="<?php _e('Volver al Inicio', 'streann_sdk'); ?>"><?php _e('inicio', 'streann_sdk'); ?></a>.</h3>
</section>
<?php endif; ?>
</div>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>