content-single.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * @package bml
  4. */
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <header class="entry-header">
  8. <h1 class="entry-title"><?php the_title(); ?></h1>
  9. <div class="entry-meta">
  10. <?php bml_posted_on(); ?>
  11. </div><!-- .entry-meta -->
  12. </header><!-- .entry-header -->
  13. <div class="entry-content">
  14. <?php the_content(); ?>
  15. <?php
  16. wp_link_pages( array(
  17. 'before' => '<div class="page-links">' . __( 'Pages:', 'bml' ),
  18. 'after' => '</div>',
  19. ) );
  20. ?>
  21. </div><!-- .entry-content -->
  22. <footer class="entry-meta">
  23. <?php
  24. /* translators: used between list items, there is a space after the comma */
  25. $category_list = get_the_category_list( __( ', ', 'bml' ) );
  26. /* translators: used between list items, there is a space after the comma */
  27. $tag_list = get_the_tag_list( '', __( ', ', 'bml' ) );
  28. if ( ! bml_categorized_blog() ) {
  29. // This blog only has 1 category so we just need to worry about tags in the meta text
  30. if ( '' != $tag_list ) {
  31. $meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'bml' );
  32. } else {
  33. $meta_text = __( 'Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'bml' );
  34. }
  35. } else {
  36. // But this blog has loads of categories so we should probably display them here
  37. if ( '' != $tag_list ) {
  38. $meta_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'bml' );
  39. } else {
  40. $meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'bml' );
  41. }
  42. } // end check for categories on this blog
  43. printf(
  44. $meta_text,
  45. $category_list,
  46. $tag_list,
  47. get_permalink()
  48. );
  49. ?>
  50. <?php edit_post_link( __( 'Edit', 'bml' ), '<span class="edit-link">', '</span>' ); ?>
  51. </footer><!-- .entry-meta -->
  52. </article><!-- #post-## -->