WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Author tag on no-author page (3 posts)

  1. Viktor Nagornyy
    Member
    Posted 3 years ago #

    Hey guys,
    Quick question.
    I'm using author tags to get information from the profile and gravatar, it works great. But, if a page has no author (search) information doesn't show up. How can I set author so information shows up? Here's my code:
    <a class="alignleft" href="<?php the_author_meta('user_url'); ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '85', '' ); ?></a><?php the_author_meta('description'); ?>

    Thanks for your help.

  2. Viktor Nagornyy
    Member
    Posted 3 years ago #

    Any ideas?

  3. Viktor Nagornyy
    Member
    Posted 3 years ago #

    Well, no help here. I paid on WPQuestions.com and got an easy answer. If anyone tries to do what I was doing here's the answer.

    <a class="alignleft" href="<?php the_author_meta('user_url',1); ?>">
    <?php echo get_avatar( get_the_author_meta('user_email',1), '85', '' ); ?>
    </a>
    <?php the_author_meta('description',1); ?>

    I'm the only author, so it just needed my author ID in there to find me. Which is 1.

    Hope someone else finds this useful!

    I recommend WPQuestions.com if anyone needs a quick answer for cheap and this forum not helping. =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags