Support » Plugin: WordPress Popular Posts » [Plugin: WordPress Popular Posts] Add an author link

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Jinxity,

    It’s very simple. Open wordpress-popular-posts.php and change this (around line 994):

    $display_name = get_the_author_meta('display_name', $p->uid);

    … into this:

    $display_name = get_author_posts_url($p->uid);

    I did not test the code but it should work. If it doesn’t, let me know.

    Thank you ! It’s exactly what I want 🙂

    Plugin Author Hector Cabrera

    (@hcabrera)

    Actually, just tested the code and it was wrong. It should be:

    $display_name = "<a href=\"".get_author_posts_url($p->uid)."\">{$author}</a>";

    I had changed the code to have this result but your code is better than what I wrote. Thanks you for your help (I think you can add this on your plugin, it’s could interest people)

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yes, I already added this change to the plugin. Will be available for everyone in the next release. Thank you for your suggestion!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress Popular Posts] Add an author link’ is closed to new replies.