WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Getting the Author’s Name to Show Up Under Post Title?

[Resolved] Getting the Author’s Name to Show Up Under Post Title?

  • Hello,

    I’m new to WordPress. I have the newest version installed.

    I was wondering if it’s possible to get the author’s username to show up under the title of the post. Does this depend on the theme used? If so, I am using the “rusty” theme. Is there a way to get the author’s name to show up under a post? This way, you would know which author wrote the post.

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Does this depend on the theme used?
    Yes.

    see: Template_Tags/the_author

    Okay.

    When I say new, I’m really new. Is there any way I can “customize” my theme by adding in the author names? How do I go by doing this?

    Thanks.

    Knowing this will be your next question – I gave you the link above 🙂

    In WP everything is done by editing the template files in your theme folder. And most of the functions (all?) are called by using the Template_Tags.
    One of those tags – if inserted in your index.php file, for example – will display the author of the post.
    Study other themes, like the Classic that comes with the WP package to see how it is done.

    What theme are you using? Take a look in index.php for the theme, see if there’s a line that looks like this in there:

    <!-- by <?php the_author() ?> -->

    If so, remove these: <!-- -->

    That should do it.

    I found a line that had <!– by <?php the_author() ?> –>

    I removed the <!– –> but now I get this error when I try to view my page:

    “Fatal error: Call to undefined function: get_header() in /home/gamespectrum/www/news/gaming/index.php on line 1”

    I think I might know what I did wrong.

    Well, post again if you still need help….

    Ah, I got it. It’s actually very easy. Thanks a ton for your help.

    You’re welcome. Have fun!

    Me, too – sort of.

    I’m using the previous version w ith the Blix theme. I tried editing the theme’s index.php as described above but still don’t see the author’s name.

    Is this because I’m using an older version?

    I don’t think so. I don’t use that theme but other themes work fine showing the author info.

    Did you clear your browser cache and hard refresh after you made the changes?

    Well, I looked a littler farther on in the blog and find that the author’s name DOES display, but it shows up after the entry and underneath the “add comment” and date line.

    I guess I’ll try to learn a little PHP on the fly and figure out how to reposition the date and author’s name to display under the title.

    Thanks for your quick reply.

    You should be able to move the relevant stuff to where you want it, it’s a matter of making sure you don’t whack the wrong stuff. Keep backup copies, and trial and error.

    It worked! Thanks for your help.

    That’s good! Have fun….

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Getting the Author’s Name to Show Up Under Post Title?’ is closed to new replies.
Skip to toolbar