WordPress.org

Forums

[resolved] Getting the Author's Name to Show Up Under Post Title? (16 posts)

  1. inSaneELF
    Member
    Posted 10 years ago #

    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.

  2. moshu
    Member
    Posted 10 years ago #

    Does this depend on the theme used?
    Yes.

    see: Template_Tags/the_author

  3. inSaneELF
    Member
    Posted 10 years ago #

    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.

  4. moshu
    Member
    Posted 10 years ago #

    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.

  5. vkaryl
    Member
    Posted 10 years ago #

    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.

  6. inSaneELF
    Member
    Posted 10 years ago #

    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"

  7. inSaneELF
    Member
    Posted 10 years ago #

    I think I might know what I did wrong.

  8. vkaryl
    Member
    Posted 10 years ago #

    Well, post again if you still need help....

  9. inSaneELF
    Member
    Posted 10 years ago #

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

  10. vkaryl
    Member
    Posted 10 years ago #

    You're welcome. Have fun!

  11. seafox
    Member
    Posted 10 years ago #

    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?

  12. vkaryl
    Member
    Posted 10 years ago #

    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?

  13. seafox
    Member
    Posted 10 years ago #

    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.

  14. vkaryl
    Member
    Posted 10 years ago #

    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.

  15. seafox
    Member
    Posted 10 years ago #

    It worked! Thanks for your help.

  16. vkaryl
    Member
    Posted 10 years ago #

    That's good! Have fun....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.