admin管理员组文章数量:1023795
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
1 Answer
Reset to default 1If 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.
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
1 Answer
Reset to default 1If 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.
本文标签: customizationFollow me for WordPress blogs (multiauthors)
版权声明:本文标题:customization - Follow me for WordPress blogs (multi-authors) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745603953a2158619.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论