SHARE
TWEET

Add comment link and count to TwentySeventeen

ulfben Sep 23rd, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //twentyseventeen/template-parts/post/content.php
  2. <header class="entry-header">
  3.         <?php
  4.         if ( 'post' === get_post_type() ) {
  5.             echo '<div class="entry-meta">';
  6.                 if ( is_single() ) {
  7.                     twentyseventeen_posted_on();
  8.                     echo ' - '; comments_popup_link();
  9.                 } else {
  10.                     echo twentyseventeen_time_link();
  11.                     echo ' - '; comments_popup_link();
  12.                     twentyseventeen_edit_link();                   
  13.                 };
  14.             echo '</div><!-- .entry-meta -->';
  15.         };
  16.  
  17.         if ( is_single() ) {
  18.             the_title( '<h1 class="entry-title">', '</h1>' );
  19.         } elseif ( is_front_page() && is_home() ) {
  20.             the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
  21.         } else {
  22.             the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  23.         }
  24.         ?>
  25.     </header><!-- .entry-header -->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top