Multiple authors in Newspaper 4?

Posted in: Newspaper
Post count: 25

Has anyone figured out how to assign multiple authors to a post in v4?

Thanks!

Post count: 9544

I usually check the wordpress.org site first… found this, not tested:
https://wordpress.org/plugins/co-authors-plus/

oops… that may not work with WordPress 4.0x … sorry.. (face palm)…

  • This reply was modified 11 years by simchris.
Post count: 25

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.

Post count: 159

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

Post count: 25

I don’t understand…the code I have that’s in the other thread isn’t going to work in v4.

Post count: 159

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();
					};?>
Post count: 25

Thank you so much, this works!!

Post count: 2

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?

Post count: 25

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!!

Post count: 6600

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

Post count: 2

I have been trying to paste the text after the <?php in the same place on the Newsmag single loop but only the real author (not guest author appears). Any suggestions?

Post count: 7909

Hi,

Try this code it should work also on newsmag – https://forum.tagdiv.com/topic/co-authors-in-newspaper-6/#post-56964

Thanks!

Post count: 2

For me this only works if there is more than one author. What should I do if I only want one guest author.

Post count: 7909

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/oaYBwClZQNhttp://screencast.com/t/aOfQUxuL

Thanks!

Post count: 3

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.

Post count: 7909

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/NiyoGElXhttp://screencast.com/t/vRLb6oWehK
If you change the order – http://screencast.com/t/fPPCmp5knODhttp://screencast.com/t/o3LDiOn14fpS

Thanks!

Post count: 3

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!

Post count: 7909

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!

Post count: 1

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!

Post count: 22421

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!

Viewing 20 posts - 1 through 20 (of 20 total)
The forum ‘Newspaper’ is closed to new topics and replies.