Support » Theme: Twenty Seventeen » Display Post Author on Front Page

  • The blog is running the Twenty Seventeen theme with the “Your homepage displays: Your latest posts” option. No child theme is being used.

    I would like for the post author’s name to be present at the top of the post where the date and post title currently display. I cannot find where to do this in the documentation.

    I see this has been asked before but I have not found a solution.
    https://wordpress.org/support/topic/show-author-on-front-page/

    It was recommended a new thread be opened on this topic.

    Thank you in advance for your help.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • create a child theme;

    create this file in the child theme (including the folder structure) from a copy of the same file in the parent theme:

    /template-parts/post/content.php

    edit this file;

    change these lines:

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

    to:

    				echo '<div class="entry-meta">';
    						twentyseventeen_posted_on();
    						echo ' - '; comments_popup_link(); 
    						twentyseventeen_edit_link();
    				echo '</div><!-- .entry-meta -->';
    
    Thread Starter bnol

    (@bnol)

    Thank you. I have implemented this and it is working. Would it be possible for me not the display the comment count?

    Would it be possible for me not the display the comment count?

    remove this line also from the code:

    echo ' - '; comments_popup_link();

    Hello,

    I was also trying to implement this change, but the author is not displaying. It looks like there is a css rule hiding the element:

    .byline, .updated:not(.published) {
    display: none;

    Does a function need to be changed somewhere as well?

    Thanks,
    CJ

    Hello @alchymyth I’m having the same issue as @catalano

    @dbmiller65
    this works pretty much like in my earlier reply https://wordpress.org/support/topic/display-post-author-on-front-page/#post-9891827

    start by creating a child theme (or, if you already edited the original theme, or can’t use a child theme for any reason, edit directly in /template-parts/post/content.php):

    just use this replacement code:

    	echo '<div class="entry-meta">';
    			
    		twentyseventeen_posted_on();
    		twentyseventeen_edit_link();
    			
    	echo '</div><!-- .entry-meta -->';

    Thanks Michael. Actually I found the issue:

    If all the posts were from the same author, then author does not appear

    Else, author appears!

    Thank you @alchymyth

    Thanks @alchymyth – this is an essential feature for a multi-author blog. Too bad it’s not an option in the customizer.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Display Post Author on Front Page’ is closed to new replies.