SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | /* | |
3 | Template Name: myloves | |
4 | */ | |
5 | - | ?><?php get_header(); ?> |
5 | + | |
6 | ||
7 | - | $query= 'cat=12&orderby=date&order=DESC'; 'paged' >= get_query_var( 'paged' ); |
7 | + | <?php get_header(); ?> |
8 | - | query_posts($query); |
8 | + | |
9 | <?php | |
10 | $args = array( | |
11 | 'cat' => 12, | |
12 | 'orderby' => 'date', | |
13 | - | <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> |
13 | + | 'order' => 'DESC', |
14 | 'paged' => get_query_var( 'paged' ) | |
15 | ); | |
16 | $myposts = new WP_Query( $args ); | |
17 | - | <header> |
17 | + | |
18 | - | <?php if ( has_post_thumbnail() ) : ?> |
18 | + | |
19 | - | <figure class="post-thumbnail"> |
19 | + | <?php if ( $myposts->have_posts() ) : |
20 | - | <?php the_post_thumbnail(); ?> |
20 | + | while ( $myposts->have_posts() ) : $myposts->the_post(); ?> |
21 | - | </figure> |
21 | + | |
22 | <article id="content" role="main" <?php post_class(); ?>> | |
23 | ||
24 | - | <?php if ( get_the_title() ): ?> |
24 | + | <header> |
25 | - | <h1><?php the_title(); ?></h1> |
25 | + | <?php if ( has_post_thumbnail() ) : ?> |
26 | <figure class="post-thumbnail"> | |
27 | - | </header> |
27 | + | <?php the_post_thumbnail(); ?> |
28 | </figure> | |
29 | - | <div class="content"><?php the_content(); ?></div> |
29 | + | <?php endif; ?> |
30 | ||
31 | <?php if ( get_the_title() ): ?> | |
32 | <h1><?php the_title(); ?></h1> | |
33 | <?php endif; ?> | |
34 | </header> | |
35 | ||
36 | <div class="content"><?php the_content(); ?></div> | |
37 | ||
38 | <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'blaskan' ), 'after' => '</div>' ) ); ?> | |
39 | ||
40 | - | <?php |
40 | + | |
41 | - | $tags_list = get_the_tag_list( '', ', ' ); |
41 | + | |
42 | - | if ( $tags_list ): |
42 | + | |
43 | - | ?> |
43 | + | |
44 | </span> | |
45 | <?php endif; ?> | |
46 | ||
47 | <?php if ( $tags_list = get_the_tag_list( '', ', ' ) ) : ?> | |
48 | <span class="tags"> | |
49 | <?php printf( __( '<span class="%1$s">Tagged with</span> %2$s', 'blaskan' ), 'tags-label', $tags_list ); ?> | |
50 | </span> | |
51 | <?php endif; ?> | |
52 | - | <?php comments_template( '', true ); ?> |
52 | + | |
53 | <?php edit_post_link( __( 'Edit', 'blaskan' ), '<span class="edit-link">', '</span>' ); ?> | |
54 | - | </article> |
54 | + | |
55 | - | <!-- #content --> |
55 | + | |
56 | <?php //comments_template( '', true ); ?> | |
57 | - | <?php endwhile; ?> |
57 | + | |
58 | </article> | |
59 | <!-- #content --> | |
60 | - | <?php get_footer(); ?> |
60 | + | |
61 | - | <?php next_posts_link( 'Pagina precedente', $mia_variabile->max_num_pages );?> |
61 | + | <?php endwhile; ?> |
62 | - | <?php previous_posts_link( 'Pagina successiva', $mia_variabile->max_num_pages );?> |
62 | + | |
63 | <?php next_posts_link( __( 'Pagina precedente', 'blaskan' ), $myposts->max_num_pages );?> | |
64 | <?php previous_posts_link( __( 'Pagina successiva', 'blaskan' ), $myposts->max_num_pages );?> | |
65 | ||
66 | <?php else : ?> | |
67 | ||
68 | <article id="content" role="main" class="not-found"> | |
69 | <p><?php _e( 'Nothing found', 'blaskan' ); ?> | |
70 | </article> | |
71 | <!-- #content --> | |
72 | ||
73 | <?php endif; ?> | |
74 | ||
75 | <?php get_sidebar(); ?> | |
76 | ||
77 | <?php get_footer(); ?> |