ulfben

Add comment link and count to TwentySeventeen

Sep 23rd, 2017
104
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×