WordPress.org

Forums

[resolved] the_author_meta not displaying (11 posts)

  1. eatanicecream
    Member
    Posted 5 years ago #

    Hi Everyone

    I'm having problems getting the post author to show up using <?php the_author_meta('description') ?>

    Can't really see what I've done wrong.

    This is the page: http://whoshouldicheerfor.wdm.org.uk/blog

    This is my loop:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<h2><?php the_title(); ?></h2>
    			<div class="entry">
    
    <small><?php the_time('F jS, Y') ?>  by <?php the_author_meta('description') ?></small>
    
    				<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    <p class="postmetadata">
    Posted in <?php the_category(', ') ?>
    <strong>|</strong>
    <?php edit_post_link('Edit','','<strong>|</strong>'); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    
    			</div>
    		</div>
    		<?php endwhile; endif; ?>
  2. MichaelH
    Member
    Posted 5 years ago #

    Works okay for me as long as there's biographical information for that post author.

    Note that <?php the_author_posts_link() ?> will display an author name and present a link to their posts.

  3. eatanicecream
    Member
    Posted 5 years ago #

    Ah, I see - I hadn't filled out anything in the bio.

    What I was expecting was the user's name to show up as a link to the bio. Do you know how I do that?

    Thanks for your help!

  4. MichaelH
    Member
    Posted 5 years ago #

    What I was expecting was the user's name to show up as a link to the bio. Do you know how I do that?

    Author Templates would be one solution.

  5. eatanicecream
    Member
    Posted 5 years ago #

    Brilliant, thank you very much.

  6. Runeshai
    Member
    Posted 5 years ago #

    I'm having a similar issue...I'm trying to call the author's name, phone number and email address using the_author_meta(), but nothing shows up no matter what parameters I use. The information is filled in (I'm assuming I use the 'Your Profile' page for this) but nothing shows up. Any thoughts?

    The page is here: http://www.halifaxaussies.com/

  7. eatanicecream
    Member
    Posted 5 years ago #

    Use <?php the_author_meta( 'description' ); ?> and put the details in the 'Biographical info' box in 'Your profile'.

    Is that what you've done?

  8. Runeshai
    Member
    Posted 5 years ago #

    Yup. I'm not using the description, but yes, I've put details in the name and other fields and am using <?php the_author_meta('display_name'); ?> to get the name but it's not showing up. Same for the 'yim' and 'aim' values. However, using <?php bloginfo('admin_email'); ?> does work to print and link the author's email address.

  9. Runeshai
    Member
    Posted 5 years ago #

    Hmm...apparently I was wrong, the bloginfo('admin_email') query doesn't work. I thought it did but I changed it in the 'Your profile' page and it didn't change on the page. Even after clearing the cache. Any thoughts? This site isn't for me, it'd be nice if it wasn't hard-coded so the user could change the data themselves.

    EDIT: Never mind. It's pulling it from 'General Settings', not 'Your Profile'. Still looking for a solution to my original post though.

  10. akwhitacre
    Member
    Posted 4 years ago #

    @Runeshai For what it's worth nine months later, I'm having the same problem. I'm trying to get the author's display name to appear within <head><title></title></head> of the author template and can't get it to appear. Plain text appears, bloginfo('admin_email'); appears if I try it...everything seems to appear except fields associated with the_author_meta();.

  11. akwhitacre
    Member
    Posted 4 years ago #

    Ah-ha, this ended up working (though the original really should have worked):

    https://wordpress.org/support/topic/the_author_meta?replies=3#post-1240832

    Instead of using get_the_author_meta('display_name'), use get_the_author_meta('display_name',get_query_var('author') ).

Topic Closed

This topic has been closed to new replies.

About this Topic