• Am I missing something, or is there no comment link or comment count on the main page of Twenty Seventeen?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You got it right, there is no comment link or count on blog page.

    Thread Starter Trench

    (@trench)

    All righty then. ?? Thanks for your response.

    Thread Starter Trench

    (@trench)

    How would I go about adding one. I can’t figure out where in the template the code should go? Thanks.

    the answer would depend on where exactly you want to have that link on each post of the main posts page of the theme.

    are you working with a child theme?
    https://codex.www.ads-software.com/Child_Themes

    Thread Starter Trench

    (@trench)

    Nope, jusy regular Twenty Seventeen. I’d like it between the date of the post and the edit link on bith the index page and the individual posts.

    without a child theme (although this is not recommended), edit content.php in /template-parts/post/ and change this section:

    				echo '<div class="entry-meta">';
    					if ( is_single() ) :
    						twentyseventeen_posted_on();
    					else :
    						echo twentyseventeen_time_link();
    						twentyseventeen_edit_link();
    					endif;
    				echo '</div><!-- .entry-meta -->';
    

    to:

    				echo '<div class="entry-meta">';
    					if ( is_single() ) :
    						twentyseventeen_posted_on();
    						echo ' - '; comments_popup_link(); 
    					else :
    						echo twentyseventeen_time_link();
    						echo ' - '; comments_popup_link(); 
    						twentyseventeen_edit_link();
    					endif;
    				echo '</div><!-- .entry-meta -->';
    

    if using a child theme, create the folder /template-parts/post/ in the child theme, and add a copy of content.php into it;
    the make the same changes as above…

    https://codex.www.ads-software.com/Function_Reference/comments_popup_link

    Thread Starter Trench

    (@trench)

    That worked perfectly. Thank you so much. ??

    Hi Michael,

    I would like to add a link to comment with comment count to my posts that appear on the home page. Is there a way to do this using a plugin or CSS? I would prefer not to edit the content.php file if at all possible because I am not using a child theme.

    Thank you,
    Agnes

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Comment link for Twenty Seventeen’ is closed to new replies.