aboutsummaryrefslogtreecommitdiffstats
path: root/content-page.php
blob: dceb9458a9b87422f8fb3b4303a2346d5b6a3c5d (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
<?php
printf  (   '<section class="main col-md-8">
                <h6 class="page-libre">no_title</h6>
                <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();
                        //echo '';
                        $template_html = '
                            <article class="col-sm-12 post">
                                <div class="contenedor">
                                    <div class="thumb">
                                        %s
                                    </div>
                                    <div class="info">
                                        <h2 class="titulo">%s</h2>
                                        <p class="fecha">%s</p>
                                        <div class="categorias">
                                            %s
                                        </div>
                        ';
                        printf(
                            $template_html,
                            get_the_post_thumbnail(),
                            get_the_title(),
                            get_the_time( 'd-M-Y' ),
                            get_the_category_list()
                            //get_the_content()
                            //the_category()
                        );
                        printf('        <div class="texto">
                                            <div>');
                                                the_content();
                        printf('            </div>
                                        </div>
                                    </div>
                                </div>
                            </article>'
                        );
                endwhile;
            else:
                printf( '<p>' . __('No hay entradas', 'libre') . '</p>' );
            endif;
            rewind_posts();
printf('        </div>
            </section>');