aboutsummaryrefslogtreecommitdiffstats
path: root/content.php
blob: 543906de2551d116ed9ec86f8f01545e5ab754fa (plain)
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
62
63
64
65
66
67
68
69
70
<?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&nbsp;' . __('por', 'libre') . '&nbsp;<a href="%s" target="_blank">%s</a></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_author_meta('user_url'),
                            get_the_author(),
                            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>
');