最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - Follow me for WordPress blogs (multi-authors)

programmeradmin7浏览0评论

If we have a blog with multiple authors is there a way for each to have a "follow me" twitter button separated. Meaning when we see the post of an author we see only the twitter button with the author account. Or because is a one blog the only option is a Follow us button meaning one account for all the authors?

If we have a blog with multiple authors is there a way for each to have a "follow me" twitter button separated. Meaning when we see the post of an author we see only the twitter button with the author account. Or because is a one blog the only option is a Follow us button meaning one account for all the authors?

Share Improve this question edited Apr 10, 2019 at 18:34 butlerblog 5,1313 gold badges28 silver badges44 bronze badges asked Feb 11, 2011 at 19:15 Abhishek GuptaAbhishek Gupta 1557 bronze badges 2
  • it would be nice if you can put "follow author name" - cuz ppl could mis-understand between following the whole blog or each specific author (the last option being less widespread" ) – mireille raad Commented Feb 12, 2011 at 2:26
  • Yeah. I want to do something similar. – Abhishek Gupta Commented Feb 12, 2011 at 2:37
Add a comment  | 

1 Answer 1

Reset to default 1

If you are using a follow button plugin like the one in my Simple Twitter Connect plugin, then you should be able to specify the user you want the button to be for.

So for example, with STC, I'd activate STC-Login and the STC-Follow Button Widget plugins. Then I'd have my users "connect" their twitter accounts and their WP accounts (STC-Login lets them do this on the Users->Your Profile page). That way it knows what their twitter accounts are.

Then this code in a theme should do the trick:

$twuid = get_the_author_meta('twuid');
if ( !empty($twuid) && function_exists('stc_follow_button') ) {
  stc_follow_button($twuid);
}

You'll have to put that code into the Loop or somewhere after it, so that the get_the_author_meta() function knows what user to look for.

发布评论

评论列表(0)

  1. 暂无评论