WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Posts not showing "Posted by author" (3 posts)

  1. IanVaughan
    Member
    Posted 2 years ago #

    Hi, I'm using v3.2.1 with stock twentyeleven theme.

    And I want it to show who has posted the post!?

    1/ In the main page (overview list of posts) it fails to show at the top and bottom.

    1.1/ Top : Under the title of the post it shows "Posted on <date>", but does not show the extra "by <user>".
    When looking at the theme template ./wp-content/themes/twentyeleven/functions.php, I see it has the by and user code present!?

    1.2/ Bottom : It fails again to show the user :
    Posted in Installation | Tagged blog, linuix, server | Leave a reply

    2./ When viewing the post it fails at the top again, but correctly shows at bottom!
    2.1/ Top just shows the same "Posted on <date>"
    2.2/ Bottom now shows the user correctly!
    "This entry was posted in Installation and tagged blog, linuix, server by Ian. Bookmark the permalink."

    I know there are other threads like this, but they seem to reference the main index.php of which does not look the same as when they posted.
    ie : http://wordpress.org/support/topic/posted-by-not-showing

    Edit: Just to note, the twentyten theme does show the Author correct in all places!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    twenty eleven has some code for 'single-author' sites to hide the author info:

    in style.css of twenty eleven:

    .single-author .entry-meta .by-author {
    	display: none;
    }

    compensate by adding something like this to style.css of the child theme:

    .single-author .entry-meta .by-author {
    	display: inline;
    }

    in content-single.php of twenty eleven:

    <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>

    in content-single.php of the child theme, remove this section:
    && is_multi_author()

  3. IanVaughan
    Member
    Posted 2 years ago #

    Ok, was rushing a little bit too fast...

    Reading the code you showed was interesting :-

    // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>`

    So a multi-author blog it wants, as this has just been installed, no one has posted but me yet, but a little nudge and a colleague posted, and bang, it started showing our names!

    Many thanks for your help!
    (No code changes made!)
    [Solved]

Topic Closed

This topic has been closed to new replies.

About this Topic