Support » Plugin: Mini Loops » [Plugin: Mini Loops] [author] doesn't work in Author pages

  • 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?

  • The topic ‘[Plugin: Mini Loops] [author] doesn't work in Author pages’ is closed to new replies.