WordPress.org

Ready to get started?Download WordPress

Forums

When the author posts, it doesn't show who posted it. (5 posts)

  1. Lilysumner
    Member
    Posted 7 years ago #

    As an author, I went in and created a post. On the blog it shows the time stamped and which category it posted to by not by whom..

    How do I configure it where the author's username is displayed?

  2. johnstonphilip
    Member
    Posted 7 years ago #

    I'm pretty sure you need to add something like this to "the loop":

    ----------

    <p>Posted by <?php the_author_posts_link() ?> on <?php the_time('d M Y'); ?>

    ----------

    *the loop is anywhere after the line that looks like:

    ----------
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    ----------

    and it is in the "index.php" of your theme

    Hope this helps

  3. Lilysumner
    Member
    Posted 7 years ago #

    This is what I see, BUT i have no clue how much of it to delete

    <!-- uncomment the "by <?php the_author(); ?> to put the author's name on the post -->
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent link to <?php the_title();?>"><?php the_title(); ?></h2>
    <small>Posted in <?php the_category(', '); ?> on <?php the_time('F jS, Y'); ?>
    <!-- by <?php the_author(); ?> --></small>
    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?></div>

    <p class="postmetadata"><?php edit_post_link('Edit','','|'); ?><?php comments_popup_link(' Leave A Comment »', '1 Comment »', '% Comments »'); ?></p>
    <?php trackback_rdf(); ?>
    </div>

    I see where it is. Do i uncomment the word (small) also?

    Thanks so much!

    Lily

  4. johnstonphilip
    Member
    Posted 7 years ago #

    hey, try reposting the code like this:

    <!-- uncomment the "by <?php the_author(); ?> to put the author's name on the post -->
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent link to <?php the_title();?>"><?php the_title(); ?></h2>
    <small>Posted in <?php the_category(', '); ?> on <?php the_time('F jS, Y'); ?> by <?php the_author(); ?></small>
    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?></div>

    <p class="postmetadata"><?php edit_post_link('Edit','','|'); ?><?php comments_popup_link(' Leave A Comment »', '1 Comment »', '% Comments »'); ?></p>
    <?php trackback_rdf(); ?>
    </div>

  5. jacsilva
    Member
    Posted 7 years ago #

    Thanks johnstonphilip ,
    I was just looking where to put the
    <small>by <?php the_author() ?></small>

    Now I can show the author at my Blog

Topic Closed

This topic has been closed to new replies.

About this Topic