Guest User

Untitled

a guest
May 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. <div class="container">
  2. <div class="row">
  3. <div id="primary" class="content-area <?php echo apply_filters('primary_bootstrap_class', 'col-sm-7'); ?>">
  4. <main id="main" class="site-main" role="main">
  5.  
  6. <?php
  7. $args = array(
  8. 'cat' => 89,
  9. 'posts_per_page' => 10,
  10. );
  11.  
  12. query_posts( $args );
  13. ?>
  14.  
  15. <?php if ( have_posts() ) : ?>
  16.  
  17. <?php /* Start the Loop */ ?>
  18. <?php while ( have_posts() ) : the_post(); ?>
  19.  
  20. <?php
  21. /* Include the Post-Format-specific template for the content.
  22. * If you want to override this in a child theme, then include a file
  23. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  24. */
  25. get_template_part( 'content', get_post_format() );
  26. ?>
  27.  
  28. <?php endwhile; ?>
  29.  
  30. <?php wp_reset_query(); ?>
  31.  
  32. <?php faster_paging_nav(); ?>
  33.  
  34. <?php else : ?>
  35.  
  36. <?php get_template_part( 'content', 'none' ); ?>
  37.  
  38. <?php endif; ?>
  39.  
  40. </main><!-- #main -->
  41. </div><!-- #primary -->
  42.  
  43. <?php get_sidebar(); ?>
  44. </div><!-- .row -->
  45. </div><!-- .container -->
  46.  
  47. function faster_post_nav() {
  48.  
  49. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
  50. $next = get_adjacent_post( false, '', false );
  51.  
  52. // Don't print empty markup if there's nowhere to navigate.
  53. if ( ! $next && ! $previous ) {
  54. return;
  55. }
  56. ?>
  57. <nav class="navigation post-navigation" role="navigation">
  58. <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'faster' ); ?></h1>
  59. <div class="nav-links">
  60. <?php
  61. previous_post_link( '<div class="nav-previous">%link</div>', __( 'Previous post', 'aran-rd' ), true );
  62. next_post_link( '<div class="nav-next">%link</div>', __( 'Next post', 'aran-rd' ), true );
  63. ?>
  64. </div><!-- .nav-links -->
  65. </nav><!-- .navigation -->
  66. <?php
  67.  
  68. }
Add Comment
Please, Sign In to add comment