Support » Fixing WordPress » Viewing author’s username

  • How can I allow WordPress to view the author’s username? I have a number of people on my site requesting for prayers and we need to know who has which prayer needs. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Very easy – this should get you going:
    http://codex.wordpress.org/Template_Tags/the_author

    Thanks for the link. I tried inserting the code in but got an error. I wonder if I’m not turning something on because here is what the index is showing already (see the “the_author” in the middle):

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php// the_date(”,'<h2>’,'</h2>’); ?>

    <div class=”post”> <!–div post starts–>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark”><?php the_title(); ?></h3>

    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category(‘,’) ?> — <?php// the_author() ?> <?php the_time(‘F j, Y @ g:i a’); ?> <?php edit_post_link(__(‘Edit This’)); ?></div>
    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>
    </div>

    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>

    Why is your code for the author like this:
    <?php// the_author() ?>

    Shouldn’t it be like this:
    <?php the_author_nickname(); ?>

    Or:
    <?php the_author() ?>

    Or:
    <?php the_author(); ?>

    Not too sure about the last two there, but I use the first one on my blog now. =)

    spencerp

    OK. Thanks, spencerp!

    I tried the suggested link but that didn’t work. Neither did the first one you posted above. However, that last one worked.

    Again, thank you!

    No problem. =) Atleast *something* worked lol! =)

    spencerp

    P.S. You might want to mark/tag this as [resolved] then maybe.. so ppl know.. ya got it fixed or whatever.. =P You can always post back, if you want to though.. 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Viewing author’s username’ is closed to new replies.