Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #901766

    Hi,

    how can I make the author comments link to the about-me-page (single blog!) instead of the author archive page,
    when someone clicks on the author comment name in the comment list below a post?

    I thought that this snippet would resolve it, but it has no effect at all:
    https://codex.wordpress.org/Plugin_API/Filter_Reference/author_link

    add_filter( 'author_link', 'modify_author_link', 10, 1 ); 	 	 
    function modify_author_link( $link ) {	 	 
        $link = 'http://example.com/';
    return $link;	 	  	 	 
    }

    Thanks.

    #901855

    Hey Chris,
    I tested this on my localhost at the bottom of my functions.php and it worked for me. See screenshot
    2018-01-23_205533
    I assume you changed the “http://example.com/” link to your profile page.

    Best regards,
    Mike

    • This reply was modified 6 years, 10 months ago by Mike.
    #902137

    Hi Mike,

    I don’t mean the author name below a post, I mean the author name & image/gravatar in the comment list!
    I had marked it strong in my post.

    #902153

    Hi,
    In my clean install the author name & gravatar in the comment list don’t have link tags so they are not links, do yours? Please include the url to the page in question so we can take a closer look.
    If yours is the same as this, and you would like this function you can edit the includes/loop-comments.php to include the links.

    Best regards,
    Mike

    #902210

    okay, again: how can I make the author COMMENTS in the COMMENT LIST linkable to the author archive OR to the ABOUT ME page?

    Example – see comment list:

    and YES, I have add an website url (my about page) in the user/admin profile!
    (my site is not yet online, so please see the demo link above)

    • This reply was modified 6 years, 9 months ago by BeeCee.
    #904165

    Hi,

    Do you want the whole comment to be a link to the author page? Please edit the includes > loop-commment.php file. Look for this code around line 49.

    <?php comment_text(); ?>
    

    Best regards,
    Ismael

    #904166

    thanks, no, only the author name and its avatar should link to the “auther page” and – better – to my own “about-me” page, because I run a single-author-blog.

    #904613

    Hi,

    Alright. Please edit the said file then look for this code.

    echo get_avatar($comment,'60', '', $gravatar_alt); ?>
    

    Replace it with:

    echo '<a rel="nofollow" href="'.$link.'" >';
                    echo get_avatar($comment,'60', '', $gravatar_alt); 
                    echo '</a';
                    ?>
    

    Please take note of the php closing tag.

    Best regards,
    Ismael

    #905849

    thanks, is working fine! Appreciate your help very much!

    #905925

    Hi,
    Glad Ismael was able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Author comments: how to redirect author name to about-me-page instead of archive’ is closed to new replies.