Advertisement
aldolat

Untitled

Oct 3rd, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Template Name: myloves
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9. <?php
  10. $args = array(
  11.     'cat' => 12,
  12.     'orderby' => 'date',
  13.     'order' => 'DESC',
  14.     'paged' => get_query_var( 'paged' )
  15. );
  16. $myposts = new WP_Query( $args );
  17. ?>
  18.  
  19. <?php if ( $myposts->have_posts() ) :
  20.     while ( $myposts->have_posts() ) : $myposts->the_post(); ?>
  21.    
  22.         <article id="content" role="main" <?php post_class(); ?>>
  23.  
  24.             <header>
  25.                 <?php if ( has_post_thumbnail() ) : ?>
  26.                     <figure class="post-thumbnail">
  27.                         <?php the_post_thumbnail(); ?>
  28.                     </figure>
  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.                 <footer>
  41.                     <?php if ( count( get_the_category() ) ) : ?>
  42.                         <span class="categories">
  43.                             <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'blaskan' ), 'categories-label', get_the_category_list( ', ' ) ); ?>
  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.  
  53.                     <?php edit_post_link( __( 'Edit', 'blaskan' ), '<span class="edit-link">', '</span>' ); ?>
  54.                 </footer>
  55.  
  56.                 <?php //comments_template( '', true ); ?>
  57.        
  58.         </article>
  59.         <!-- #content -->
  60.  
  61.     <?php endwhile; ?>
  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(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement