aboutsummaryrefslogtreecommitdiffstats
path: root/content.php
diff options
context:
space:
mode:
authorHeckyel <heckyel@openmailbox.org>2017-02-20 19:28:35 -0500
committerHeckyel <heckyel@openmailbox.org>2017-02-20 19:28:35 -0500
commit7f5cb4effd041e1c86aa3e4847bac78e0498389d (patch)
tree9c482cd674f48dc2a4dd9ba80dc21ffa183bfeb5 /content.php
downloadlidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.tar.lz
lidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.tar.xz
lidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.zip
primera versión
Diffstat (limited to 'content.php')
-rw-r--r--content.php68
1 files changed, 68 insertions, 0 deletions
diff --git a/content.php b/content.php
new file mode 100644
index 0000000..4c86763
--- /dev/null
+++ b/content.php
@@ -0,0 +1,68 @@
+<?php
+printf ('
+ <section class="main col-md-8">
+ <div class="row titulo-seccion">
+ <div class="col-md-12">
+ <h3>' . __('Lo más reciente', 'libre') . '</h3>
+ </div>
+ </div>
+
+ <div class="row posts">');
+ //Lógica de the_loop
+ //Si (hay entradas)
+ //mientras (hay entradas)
+ //muestra la info de las entradas
+ //Si no
+ //no hay entradas publicadas
+ if( have_posts() ):
+ while( have_posts() ):
+ the_post();
+ $template_html = '
+ <article class="col-sm-6 post">
+ <div class="contenedor">
+ <div class="thumb">
+ <a href="%s">
+ %s
+ </a>
+ </div>
+ <div class="info">
+ <h2 class="titulo"><a href="%s">%s</a></h2>
+ <p class="fecha">%s</p>
+ <div class="extracto">%s</div>
+ <div class="categorias">
+ %s
+ </div>
+ </div>
+ </div>
+ </article>
+ ';
+ printf(
+ $template_html,
+ get_the_permalink(),
+ // has_post_thumbnail(),
+ // the_post_thumbnail( 'homepage-thumb' ),
+ get_the_post_thumbnail(),
+ get_the_permalink(),
+ get_the_title(),
+ get_the_time( 'd-M-Y' ),
+ get_the_excerpt(),
+ //the_category()
+ get_the_category_list()
+ );
+ endwhile;
+ else:
+ printf( '<p>' . __('No hay entradas', 'libre') . '</p>' );
+ endif;
+ rewind_posts();
+printf ('
+</div>
+ <section class="row paginacion">
+ <h6 class="page-libre">no_title</h6>
+ <div class="col-md-12">
+ <div class="pagination">');
+ wp_pagenavi();
+printf (' </div>
+ </div>
+ </section>
+</section>
+');