[resolved] Trouble with posts_link in Get Author Profile Plugin (3 posts)

  1. Kathy_P
    Posted 11 years ago #

    I had my contributors page working nicely, and then I decided that it would be nice if each author's name was a link to the author page. I am already using the Get Author Profile Plugin. I changed <?php author_profile('nickname'); ?> to <?php author_profile('posts_link'); ?> but all that did is echo the uri to the author template--it didn't actually make a hyperlink. So then I tried to set it up as a hyperlink, like so:
    <a href="<?php author_profile('posts_link'); ?>>"<?php author_profile('nickname'); ?></a> but that made it so nothing showed up--no author name and no author uri. As far as I can tell, I am not nesting php, so that shouldn't be the problem. Then I thought maybe it doesn't work because the link has to be returned, not echoed. (My understanding of these terms is shaky at best.) So I also tried it this way:
    <a href="<?php author_profile('posts_link', FALSE); ?>>"<?php author_profile('nickname'); ?></a>
    Still nothing. Can someone point out my mistake? Thanks.

  2. Kafkaesqui

    Posted 11 years ago #

    Your HTML coding is off a bit:

    <a href="<?php author_profile('posts_link'); ?>"><?php author_profile('nickname'); ?></a>

    Note after the posts_link you have ?>>" when it should be ?>">

  3. Kathy_P
    Posted 11 years ago #

    Thanks! I thought it was something tiny, but I just couldn't see it. It works just right now.

Topic Closed

This topic has been closed to new replies.

About this Topic