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

/loop-single.php

https://github.com/scottsweb/null
PHP | 98 lines | 67 code | 26 blank | 5 comment | 17 complexity | cf11a1b18f632c5a9359f04c02d04e6d MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php if (have_posts()) : the_post(); ?>
  2. <?php tha_entry_before(); ?>
  3. <article <?php post_class() ?> role="article">
  4. <?php tha_entry_top(); ?>
  5. <header>
  6. <h2 class="entry-title"><?php the_title() ?></h2>
  7. </header>
  8. <div class="entry-content">
  9. <?php wp_link_pages('before=<div class="page-link">' . __('Page:', 'null') . '&after=</div>&link_before=<span>&link_after=</span>') ?>
  10. <?php the_content() ?>
  11. </div>
  12. <footer>
  13. <p class="entry-meta entry-description">
  14. <?php
  15. printf(__('This entry was posted by %1$s on %2$s and is filed under %3$s. ', 'null'),
  16. get_the_author(),
  17. '<time datetime="'.get_the_time('Y-m-d').'">'.null_get_time('l, F jS, Y @ g:ia').'</time>',
  18. get_the_category_list(', ')
  19. );
  20. printf(__('You can follow any responses to this entry through the %1$sRSS 2.0%2$s feed. ', 'null'),
  21. '<a href="'.get_post_comments_feed_link().'">',
  22. '</a>'
  23. );
  24. if ( comments_open() && pings_open() ) {
  25. // Both Comments and Pings are open
  26. printf(
  27. __('You can <a href="#respond">leave a response</a>, or <a href="%1$s" rel="trackback">trackback</a> from your own site.', 'null'),
  28. get_trackback_url()
  29. );
  30. } else if ( !comments_open() && pings_open() ) {
  31. // Only Pings are Open
  32. printf(
  33. __('Responses are currently closed, but you can leave a <a href="%1$s" rel="trackback">trackback</a> from your own site.', 'null'),
  34. get_trackback_url()
  35. );
  36. } else if ( comments_open() && !pings_open() ) {
  37. // Comments are open, Pings are not
  38. _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'null');
  39. } else if ( !comments_open() && !pings_open() ) {
  40. // Neither Comments, nor Pings are open
  41. _e('Both comments and pings are currently closed.', 'null');
  42. }
  43. ?>
  44. </p>
  45. </footer>
  46. <nav class="pagination" role="navigation">
  47. <div class="previous"><?php previous_post_link('%link', '&laquo; %title') ?></div>
  48. <div class="next"><?php next_post_link('%link', '%title &raquo;') ?></div>
  49. </nav>
  50. <?php
  51. // if comments are open or we have at least one comment, load up the comment template
  52. if (comments_open() || '0' != get_comments_number()) {
  53. comments_template();
  54. }
  55. ?>
  56. <?php tha_entry_bottom(); ?>
  57. </article>
  58. <?php tha_entry_after(); ?>
  59. <?php else : // hopfully WordPress will 404 this ?>
  60. <?php tha_entry_before(); ?>
  61. <article role="article">
  62. <?php tha_entry_top(); ?>
  63. <h3><?php _e('Post Not Found', 'null'); ?></h3>
  64. <p class="notice"><?php _e("Sorry, but you are looking for something that isn't here.", 'null'); ?></p>
  65. <?php tha_entry_bottom(); ?>
  66. </article>
  67. <?php tha_entry_after(); ?>
  68. <?php endif; ?>