WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
get_author_posts_url() not working for Guest Authors (3 posts)

  1. Josh
    Member
    Posted 1 year ago #

    After lots of trial and error, I was finally able to get the multiple "About Author" boxes to work at the end of posts, mostly thanks to the instructions in this very helpful thread.

    It works perfectly with regular WP authors, but I just discovered that the link to author pages doesn't work for guest authors. I've searched through the past 10 pages of support topics and couldn't find anything.

    Here is the code I'm using for the "About Author" boxes:
    http://pastebin.com/embed_js.php?i=AbzeZ7pu

    Example of the (regular WP user) authors' links working.
    Example of the guest author's link not working.

    Any ideas? Thanks in advance! This is a fantastic plugin.

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Josh
    Member
    Posted 1 year ago #

    Wow, found the solution in the thread immediately beneath this one (as in, most recent). Didn't see it earlier because I was scanning for "guest author". Figures!

    What doesn't work for guest authors: get_author_posts_url( $coauthor->ID )

    This does work: get_author_posts_url($coauthor->ID,$coauthor->user_nicename)

  3. trewknowledge
    Member
    Posted 9 months ago #

    Thanks Josh,

    get_author_posts_url($coauthor->ID,$coauthor->user_nicename)

    worked for me as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.