WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] coauthors_posts_links not linking to author page (6 posts)

  1. ad4mlaz
    Member
    Posted 1 year ago #

    Hi,
    I am using coauthors_posts_links() and I am expecting it to link to the author's page, as with the_author_post_link(). However, all links point to my blog's home page.

    How can I fix this?

    Thanks,
    Adam

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

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    A few questions:

    • Can you share the exact code you're using?
    • What other plugins are you using, and does it happen with those plugins off?
    • What are your permalinks set to?
  3. ad4mlaz
    Member
    Posted 1 year ago #

    The code I am using is:

    if(function_exists('coauthors_posts_links')){
    	coauthors_posts_links();
    }
    else {
    	the_author_posts_link();
    }

    None of the other plugins I am running seem to effect this behaviour. When I disable Co-Authors Plus, the problem is fixed.

    My permalinks are set to default http://www.example.com/?p=123

  4. Lord Bob
    Member
    Posted 1 year ago #

    I'm having what appears to be a related problem; my author links using get_author_posts_url() point to my blog's home page with Co-Authors Plus 3.0.1 (WordPress 3.4.2) enabled rather than the author's page. When I disable Co-Authors Plus, the link points to the author's page correctly.

    A sample of the code in question is:

    <a class="authorname" href="<?php echo get_author_posts_url(1); ?>"><?php echo get_the_author_meta('display_name', 1); ?></a>

    This code has worked with pre-3.0 versions of Co-Authors Plus; I can't swear on which upgrade it stopped working since I only noticed this morning.

    Permalinks are set to default as with ad4mlaz.

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Sorry about that. I've confirmed the issue and have pushed a fix in 3.0.2, released just now.

    @Lord Bob: You'll want to use the coauthors_posts_links() as indicated above.

  6. ad4mlaz
    Member
    Posted 1 year ago #

    Thanks Daniel.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic