WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Call to undefined function the_author_posts_link() (8 posts)

  1. alvarix
    Member
    Posted 4 years ago #

    This is weird. the_author_posts_link() produces a fatal error. the_author() works fine. The function is in the documentation, and I've never had a problem with it before. I am calling it on a category query on index.

    I am running 2.9.2

  2. alvarix
    Member
    Posted 4 years ago #

    I meant the_authors_post_link()

  3. alvarix
    Member
    Posted 4 years ago #

    Doing a google search Ive noticed it failing on other blogs as well

  4. MichaelH
    Member
    Posted 4 years ago #

    Using the WordPress Default theme, in the wp-content/themes/default/index.php, have no problem when I change this
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    to this:

    <small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?> </small>

    Related:

    Template_Tags/the_author_posts_link

  5. alvarix
    Member
    Posted 4 years ago #

    ok, the wrong syntax,
    the_authors_post_link()
    is what is shown in code examples here: http://codex.wordpress.org/The_Loop.
    Somebody needs to update that page. I tried but I dont have permission.

    The correct function is indeed:
    the_author_posts_link()

    I think the function name may have recently changed?

    Thanks.

  6. MichaelH
    Member
    Posted 4 years ago #

  7. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Corrected two instances of the_authors_post_link() to the_author_posts_link() on that Codex page.

  8. MichaelH
    Member
    Posted 4 years ago #

    Oh you mean that scoundrel esmi just recently changed Codex ;)

    Thanks esmi.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.