content-aside.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Template part for displaying asides
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Scratchpad
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php scratchpad_sticky(); ?>
  12. <header class="entry-header">
  13. <?php
  14. if ( is_single() ) {
  15. the_title( '<h1 class="entry-title">', '</h1>' );
  16. } else {
  17. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  18. }
  19. ?>
  20. </header><!-- .entry-header -->
  21. <div class="entry-content">
  22. <?php
  23. the_content( sprintf(
  24. /* translators: %s: Name of current post. */
  25. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
  26. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  27. ) );
  28. wp_link_pages( array(
  29. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'scratchpad' ),
  30. 'after' => '</div>',
  31. 'link_before' => '<span>',
  32. 'link_after' => '</span>',
  33. ) );
  34. ?>
  35. </div><!-- .entry-content -->
  36. <footer class="entry-meta">
  37. <?php scratchpad_post_format(); ?>
  38. <?php scratchpad_posted_on(); ?>
  39. <?php
  40. edit_post_link(
  41. sprintf(
  42. /* translators: %s: Name of current post */
  43. esc_html__( 'Edit %s', 'scratchpad' ),
  44. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  45. ),
  46. '<span class="edit-link"><span class="sep">&bull;</span>',
  47. '</span>'
  48. );
  49. ?>
  50. </footer><!-- .entry-meta -->
  51. </article><!-- #post-## -->