Has anyone figured out how to assign multiple authors to a post in v4?
Thanks!
Thanks, yes, that’s what I’m currently using but the code customizations aren’t going to work in 4, I’m afraid…
I think I might try switching to the “Bylines” plugin — seems to do the trick much more painlessly.
Hi, it seems that you ignored the threat where you’ve posted too. 😉
https://forum.tagdiv.com/topic/co-authors-guest-author-and-author-link/#post-14146
The code works in single-loop.php or similiar – but not for author bio
I don’t understand…the code I have that’s in the other thread isn’t going to work in v4.
Ths works for me in loop-single.php
<?php //echo $td_mod_single->get_author();
$coauths = get_coauthors();
if (count($coauths) > 1) {
echo "von ";
foreach($coauths as $key => $coauth) {
echo '<a href="/author/'.$coauth->user_nicename.'">'.$coauth->display_name.'</a>';
// add "and"
if ($key != count($coauths)) {
echo ' und ';
$coauths = substr($coauthsHTML, 0, -4);
}
}
} else {
echo $td_mod_single->get_author();
};?>
I tried the Byline plugin that you suggested, @partnowjess. While it seemed to fill in the guest author information under the title correctly, it unfortunately output the guest author’s name randomly in other parts of the them. I cannot recommend it as an alternative.
@mbasche, would you mind sharing exactly the line numbers that you replaced with this code? Did those this affect the output in the Author Box at all or just the names under the title? And does it handle only registered user authors or does it also work with Co-Authors Plus’s guest authors?
Now we just finally updated our theme to Newspaper 4, and I can’t integrate the Co-Authors plugin. @mbasche, is it still working for you? Could you show me exactly what you replaced in loop-single?
Thanks!!
Hi,
I’ve tested this using the latest theme version (4.6.2) and is still working like @mbasche suggested.
Just add this code: http://pastebin.com/0ud0qGZ2 like this, replacing the old author function: http://screencast.com/t/aNH2JNzIL
And use this coauthors plugin: https://wordpress.org/plugins/co-authors-plus/
You will get this result: http://screencast.com/t/fibOmZe10
Thanks
Hi,
Try this code it should work also on newsmag – https://forum.tagdiv.com/topic/co-authors-in-newspaper-6/#post-56964
Thanks!
Hi,
@ralf83 You need to use this plugin – https://wordpress.org/plugins/co-authors-plus/ and you need custom modification to implement it for post template that you use – http://screencast.com/t/GOXrK2OTf use this code – http://pastebin.com/chADk3Xw
Result: http://screencast.com/t/oaYBwClZQN – http://screencast.com/t/aOfQUxuL
Thanks!
Hi,
Is there anything I can add to this code – http://pastebin.com/chADk3Xw so that only one guest author will be credited in the byline? The code works great for two guest authors, but if I have only one guest author then the admin who posted the article is credited and not the actual guest author.
Hi,
I’m not sure what you mean please provide more details what you are trying to do. The author will be displayed in order you add them in backend – http://screencast.com/t/NiyoGElX – http://screencast.com/t/vRLb6oWehK
If you change the order – http://screencast.com/t/fPPCmp5knOD – http://screencast.com/t/o3LDiOn14fpS
Thanks!
Hi Alin,
When I have two authors then both guest authors are displayed in the byline, which is great. But I want to modify the code so that only one author from the guest authors of the co-authors plus plugin will be displayed in the byline if I have only one guest author added in the backend. Currently with this code –http://pastebin.com/chADk3Xw I have one of two things happen:
1. Two guest authors are displayed in the byline
2. If I have only one guest author added in the backend then author who published the article is displayed instead of the guest author.
I hope this clarifies what I am trying to accomplish. I look forward to hearing back from you.
Thank you!
-
This reply was modified 10 years by
Thomson Studio.
Hi,
Do you refer about the link when only one author remains?
Please try this code and see how it works – http://pastebin.com/uqSrSvwm
Thanks!
Hi, I’m still trying to add the get_author_box to work on Newsmag template, but maybe I’m missing something. Can anyone help? @partnowjess @mbasche?
Thanks!
Hello,
Unfortunately the code was changed since that version of the theme. I think you are reffering to this topic: https://forum.tagdiv.com/topic/co-authors-guest-author-and-author-link/#post-14146. The theme had 2 major updates since then. The code was changed and that method does not apply anymore. Plus it was made for newspaper. Newsmag is a different theme.
Thank you!