Ready to get started?Download WordPress


[resolved] Which template tag pulls author profile? (8 posts)

  1. intricateartist
    Posted 5 years ago #

    I'm using the author meta to call up a link outside the loop to the author profile on a multiple author blog.

    I was using first_name, but then someone came in and put a nickname and it appeared that's how the author profile page recognized her so I changed it to display name, as she chose her nickname as her display name. Now, another authors profile link isn't working because WP sees his profile as his first name only when his display name is set to first and last. So which string is it that pulls in the author page and displays their posts? (think author link outside the loop)

    These are the strings that reference the authors name on the template tag page. I don't even see one for author_link. :/


  2. Adam Harley (Kawauso)
    Posted 5 years ago #

  3. MichaelH
    Posted 5 years ago #

    What about user_url?

    Author Templates

  4. intricateartist
    Posted 5 years ago #

    The user_url links to their website.

    Here's what I've got:

    <li><strong>Profile:</strong> <a href="/author/<?php the_author_meta('display_name',1); ?>">Articles written by <?php the_author_meta('display_name',1); ?></a></li>

    I used to have "first_name" but someone came in and used a nickname as their display name. I bascially want to do a author_link outside the loop but don't know what the default tag is for what WP is looking for for the author link. It is not "first_name" and it is not "display_name".

    Edited to add: This is not an author template. This is a custom template, custom code, all outside the loop.

  5. MichaelH
    Posted 5 years ago #

    Do you mean a link to an author's posts?

  6. intricateartist
    Posted 5 years ago #

    Yes, that's exactly how I want this link to work. But since that has no parameters to indicate which author and can't be used outside the loop - I need to know what wordpress is looking for in that function and use the right string from the author template tags that CAN be used outside the loop.

  7. MichaelH
    Posted 5 years ago #

    With the WordPress 2.8.4 core, using http://wingrep.com on the string "the_author_posts_link", found that function uses get_author_posts_url.

  8. intricateartist
    Posted 5 years ago #

    Now that's a neat little tool, albeit a bit over my head - thanks, Michael.

    I've switched the string to user_nicename, that seems to be playing well and linking correctly to the author profile/template page.

    Thanks for your help!!


Topic Closed

This topic has been closed to new replies.

About this Topic