Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: myloves
- */
- ?>
- <?php get_header(); ?>
- <?php
- $args = array(
- 'cat' => 12,
- 'orderby' => 'date',
- 'order' => 'DESC',
- 'paged' => get_query_var( 'paged' )
- );
- $myposts = new WP_Query( $args );
- ?>
- <?php if ( $myposts->have_posts() ) :
- while ( $myposts->have_posts() ) : $myposts->the_post(); ?>
- <article id="content" role="main" <?php post_class(); ?>>
- <header>
- <?php if ( has_post_thumbnail() ) : ?>
- <figure class="post-thumbnail">
- <?php the_post_thumbnail(); ?>
- </figure>
- <?php endif; ?>
- <?php if ( get_the_title() ): ?>
- <h1><?php the_title(); ?></h1>
- <?php endif; ?>
- </header>
- <div class="content"><?php the_content(); ?></div>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'blaskan' ), 'after' => '</div>' ) ); ?>
- <footer>
- <?php if ( count( get_the_category() ) ) : ?>
- <span class="categories">
- <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'blaskan' ), 'categories-label', get_the_category_list( ', ' ) ); ?>
- </span>
- <?php endif; ?>
- <?php if ( $tags_list = get_the_tag_list( '', ', ' ) ) : ?>
- <span class="tags">
- <?php printf( __( '<span class="%1$s">Tagged with</span> %2$s', 'blaskan' ), 'tags-label', $tags_list ); ?>
- </span>
- <?php endif; ?>
- <?php edit_post_link( __( 'Edit', 'blaskan' ), '<span class="edit-link">', '</span>' ); ?>
- </footer>
- <?php //comments_template( '', true ); ?>
- </article>
- <!-- #content -->
- <?php endwhile; ?>
- <?php next_posts_link( __( 'Pagina precedente', 'blaskan' ), $myposts->max_num_pages );?>
- <?php previous_posts_link( __( 'Pagina successiva', 'blaskan' ), $myposts->max_num_pages );?>
- <?php else : ?>
- <article id="content" role="main" class="not-found">
- <p><?php _e( 'Nothing found', 'blaskan' ); ?>
- </article>
- <!-- #content -->
- <?php endif; ?>
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement