PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/news/loop-nav.php

https://bitbucket.org/lgorence/quickpress
PHP | 35 lines | 18 code | 8 blank | 9 comment | 3 complexity | b3efba4298f4c3334114b3d90bf61b28 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /**
  3. * Loop Nav Template
  4. *
  5. * This template is used to show your your next/previous post links on singular pages and
  6. * the next/previous posts links on the home/posts page and archive pages.
  7. *
  8. * @package News
  9. * @subpackage Template
  10. */
  11. ?>
  12. <?php if ( is_singular( 'post' ) ) : ?>
  13. <div class="loop-nav navigation-links">
  14. <?php previous_post_link( '%link', '<span class="previous">' . __( '&larr; Previous', 'news' ) . '</span>' ); ?>
  15. <?php next_post_link( '%link', '<span class="next">' . __( 'Next &rarr;', 'news' ) . '</span>' ); ?>
  16. </div><!-- .navigation-links -->
  17. <?php elseif ( is_attachment() ) : ?>
  18. <div class="loop-nav navigation-links">
  19. <?php previous_image_link( false, '<span class="previous">' . __( '&larr; Previous', 'news' ) . '</span>' ); ?>
  20. <?php next_image_link( false, '<span class="next">' . __( 'Next &rarr;', 'news' ) . '</span>' ); ?>
  21. </div><!-- .navigation-links -->
  22. <?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination(); ?>
  23. <?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '&larr; Previous', 'news' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next &rarr;', 'news' ) . '</span>' ) ) ) : ?>
  24. <div class="loop-nav navigation-links">
  25. <?php echo $nav; ?>
  26. </div><!-- .navigation-links -->
  27. <?php endif; ?>