Mini Loops
[author] doesn't work in Author pages (1 post)

  1. jdrowell
    Posted 2 years ago #

    Mini loops work fine in all pages (home, categories, etc.) except for the author pages (/author/xxx). Maybe it's due to caching, but in these pages the [author] shortcode returns the author who's posts we're currently viewing, not the one for the posts inside the mini loop.

    For example, if I visit /author/john, all my entries in a mini loop widget will show the [author] as being "john" instead of their real author. I hacked the fix below to force fetching the correct author (this is in helpers.php):

    function miniloop_author() {
    //return get_the_author();;
    $my_post = get_post(get_the_ID());
    return get_the_author_meta('display_name', $my_post->post_author);

    Not very efficient but gets the correct results. Does anyone else have this problem, or should I look into my PHP setup?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Mini Loops
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic