WordPress.org

Ready to get started?Download WordPress

Forums

Altering the_author_posts_link output (3 posts)

  1. aaronkarp
    Member
    Posted 3 years ago #

    Is there any way to change the output of the_author_posts_link? Specifically, I'd like to change the text of the link to something other than just the author's name. My designer is rather particular about how links should look/what they should say.

    Thanks in advance to anyone who can help with this.

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/author-template.php#L185

    maybe you can use the filter to change things; or use the code to write your own function?

  3. MayaS
    Member
    Posted 3 years ago #

    in the wp-includes/author-template.php
    find "function the_author_posts_link"

    replace
    get_author_posts_url( $authordata->ID, $authordata->user_nicename )

    with
    get_author_posts_url( $authordata->ID, $authordata->nickname )

    that returns the nickname
    and you can set anything you want for the nickname in the admin panel

Topic Closed

This topic has been closed to new replies.

About this Topic