WordPress.org

Ready to get started?Download WordPress

Forums

Add Author's name ?? (2 posts)

  1. hzemall
    Member
    Posted 6 years ago #

    How can I have the authors name appear on posts and or pages they write, and even their picture ?

    Thanks

  2. nickrita
    Member
    Posted 6 years ago #

    hzemall, in your theme on single.php there is the beginning of the loop:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<div class="post">

    After this there is something like this:

    <h2 id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?> <small> von <?php the_author_posts_link(); ?></small></a></h2>

    In this I linked the author to the author profile by <?php the_author_posts_link(); ?>. If you don't want it as a link, you can use <?php the_author(); ?> instead.

    To get a photo look for plugins with avatars or gravatars (I don't know, because I don't have them.)

    Greetings,
    Rita

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.