I want to add a link on author name to author's post page. I tried with get_author_posts_url() but unsuccessfully. Maybe someone could help me ?
http://wordpress.org/extend/plugins/wordpress-popular-posts/
I want to add a link on author name to author's post page. I tried with get_author_posts_url() but unsuccessfully. Maybe someone could help me ?
http://wordpress.org/extend/plugins/wordpress-popular-posts/
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 :)
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)
Yes, I already added this change to the plugin. Will be available for everyone in the next release. Thank you for your suggestion!
You must log in to post.