Separate Author and reviewer
-
I need to show the byline as two separate lines
1) The actual author of the post
2) The professional who has fact-checked the post.
Is there a way to output author 1 and author 2 as separate parts so I can put something like
Written by John D. Fact Checked by Mike W
I don’t want author boxes just a byline that shows the two people so it shows their name, avatar and link to author archive page.
Here’s an example https://totalshape.com/fitness/is-chris-bumstead-on-steroids/
Please advise.
Thank you.
- This topic was modified 2 years, 1 month ago by one3rdnerd.
-
Hi @one3rdnerd,
I understand your need, but I’m afraid that feature is not available yet. However, a workaround would be to:
1) Enable the multi-authors feature (Go to:
Authors > Settings > Co-authors
)
2) In that same screen, edit the “As delimiter to separate last two author names, use:” option to set: “. Fact Checked by
” (without quotes). AndSave Settings
.
3) Then go edit the post and pick “John D.
” as the main (first) author and “Mike W
” as the second author (in the list, I mean)Drawback: You are limiting the multi-authors feature. So your last author will be preceded by the “
. Fact Checked by
” string. If you don’t have multi-authored posts, this won’t be an issue at all.And I’m assuming your theme provides the “Written by ” string at the beginning of your bylines. If it doesn’t, no worries, you can upgrade to Molongui Authorship Pro. One of the premium features it provides allows you to customize your byline prepending custom strings.
Hope this helps!
I’m closing this ticket now. But feel free to re-open it if you need further assistance.
- This reply was modified 2 years, 1 month ago by Molongui.
Hey @molongui
Thank you for getting back to me.
Okay, I might give that a try.
As for the drawback, I wasn’t 100% sure what you mean by if we don’t have multi-authored posts?
All posts are written by one writer, never more than one.
But different posts on this site are written by different authors and fact checked by different fact-checkers.
I’m assuming that means we will be fine?
We are using BeaverBuilder which adds the bylines, I was under the impression I would have to build my own shortcode to output the new byline though so it can show two as we can’t edit the module used by Beaverbuilder for this byline I will need to create a new shortcode.
Please advise if that all seems fine to you?
Okay I have given this a try and its sort of working out of the box but there are a couple of issues.
Please see this video:
1) Why is there a space before the full stop/period.
2) Why does it impact the author bio box at the end?
3) Can we set it to output the author avatar in the byline? I added a local author avatar but it doesn’t show for the second author, only the first one where gravatar is used.Please advise.
I also tried to add a line break with
<br>
and it works but it breaks the link and makes everything link to the first author.Default author bios are broken even after turning these settings off in the plugin to remove the extra fields and the Molongui bio etc.
Default author bio box ends up having both names added when we only want one.
Please advise.
As for the drawback, I wasn’t 100% sure what you mean by if we don’t have multi-authored posts?
1 post = 1 author => Single authored post. No worries here
1 post = N authors => Multi-authored post. Here you should always add (as last author) a reviewer for the article, so using “Fact Checked by ” as last delimiter in your bylines makes sense.Anyway, yes, in your case you’ll be fine. Forget about this drawback
Why is there a space before the full stop/period
It is actually our plugin the one placing that space there. It doesn’t expect the last delimiter to start with a symbol. We could add some logic to prevent that space being added if the string provided as delimiter starts with a “,” or “.”
Why does it impact the author bio box at the end?
We should look into how BB has that author boxed coded to provide an accurate answer. Anyway, it must have to be something with the fact that now your post has two authors (John and Natalie). Remember that regardless you using the co-authors feature this way, you are actually configuring the post to have two authors.
However, I guess we could add a hook you can use to avoid your author box being modified.
Can we set it to output the author avatar in the byline? I added a local author avatar but it doesn’t show for the second author, only the first one where gravatar is used
I’d say it has nothing to do with where the image is retrieved from. I mean, if you upload a local image for your first author, it should be displayed. However, no matter what, avatar for the second author/reviewer won’t be displayed. The Pro version of our plugin provides you a shortcode to retrieve the avatars for all the authors in a post, so you can make it display in front of the byline. Here you have the doc.
I also tried to add a line break with <br> and it works but it breaks the link and makes everything link to the first author
Yes, a
<br>
breaks the links in the byline for a multi-authored post. Sorry.Hi @molongui
Anyway, yes, in your case you’ll be fine. Forget about this drawback
Ah yes, that’s fine in my case.
It is actually our plugin the one placing that space there. It doesn’t expect the last delimiter to start with a symbol. We could add some logic to prevent that space being added if the string provided as delimiter starts with a “,” or “.”
I think it would be smart to have it remove the space if . or , was used, or just a checkbox option above the field which says “Remove extra space”
We should look into how BB has that author boxed coded to provide an accurate answer. Anyway, it must have to be something with the fact that now your post has two authors (John and Natalie). Remember that regardless you using the co-authors feature this way, you are actually configuring the post to have two authors.
However, I guess we could add a hook you can use to avoid your author box being modified.
Okay, yes I think that would be good. If you send me your email address I can send you a copy to investigate if you want.
I’d say it has nothing to do with where the image is retrieved from. I mean, if you upload a local image for your first author, it should be displayed. However, no matter what, avatar for the second author/reviewer won’t be displayed. The Pro version of our plugin provides you a shortcode to retrieve the avatars for all the authors in a post, so you can make it display in front of the byline. Here you have the doc.
Okay, I don’t know if the client requires the avatar, but I will note that for if I do need it.
Yes, a <br> breaks the links in the byline for a multi-authored post. Sorry.
Could you create an option to make it, so each author is on its own line with a checkbox in a future update?
Hi @molongui
I hope you had a good weekend.
Just checking on this to see if you had any thoughts on a couple of my follow up questions.
Hi @one3rdnerd,
Please open a support ticket with us here so you can have email access to us. Also, please let us know whether that author box is displayed by your theme or BB. If it is BB, which module do you use to add it? Or maybe you are using several modules to pull author information and you build up that author box from scratch?
Thank you. I have sent the message through that and attached the two plugins
1) Beaver Builder
2) Beaver Themer.This uses a single Beaver Themer module called “Author bio”.
Thanks
Hey
How did you resolve this? I’m still looking for a solution
Thanks- This reply was modified 1 year, 11 months ago by sunnyp81.
John (the dev) shared the below solution once we investigated via email
Please add the piece of code below to your functions.php file (or there where you find more appropriate) and check if the author box is displaying correct information now. Please know that that author box won’t work for (Molongui) guest authors. If you have none or you have the feature disabled, no need to worry.
add_filter( '_authorship/filter/get_user_by', function( $data, $args ) { list( $filter, $user ) = $data; $fn = 'do_shortcode'; $file = 'bb-theme-builder/modules/fl-author-bio/includes/frontend.php'; $dbt = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 20 ); if ( $key = array_search( $fn, array_column( $dbt, 'function' ) ) and isset( $dbt[$key]['file'] ) and substr_compare( $dbt[$key]['file'], $file, strlen( $dbt[$key]['file'] )-strlen( $file ), strlen( $file ) ) === 0 ){ $filter = false; } return array( $filter, $user ); }, 10, 2 );
There are a few limitations that would be great to solve in the future to make this approach more flexible which are
– Ability to remove the <space><dot><space> between the authors, if keeping on one line a comma without a space before would be the ideal outcome. I think controlling this with a checkbox option would be best in terms of user-experience.
– Ability to put a line break between the two authors so the “Reviewed by” author can be on a line below the writer.I hope that helps.
thanks @one3rdnerd – I will give this a try. Appreciate the quick response.
Using this one, seems to be easier to manage and control. At least as an MVP!
https://www.ads-software.com/plugins/publishpress-authors/I tried that one but couldn’t seem to achieve what I wanted, but this plugin worked for me.
Did you manage to get the other one to work for multiple authors?
Hey – no you’re right. After much faffing I gave up on the PublishPress as well. I can get both Author to show up, but still cant get the Fact Checked By to show how I like.
Ill give it another crack at the weekend – thanks for your help so far ??
- The topic ‘Separate Author and reviewer’ is closed to new replies.