Archived topic
Adding Author Box
5 replies · Started by John on March 19, 2023
Hi there,
I want to know if you have any advice on using shortcode in Hook element for adding an author box to posts.
ON this site I am already using a Beaver Builder saved row shortcode to display content using Hooks above category shop pages.
https://seedsofthesunbyronbay.com/product-category/yoni-wands/
Is it possible to do something similar for an author box?
So create the author box in Beaver Builder, then load it in a Hook after_entry_content?
I have been looking at how I could possibly adjust some of the code in this article to create this, but not sure how:
https://generatepress.com/forums/topic/how-to-add-author-box-and-notification-bar/#post-699300
Is there a way to achieve this somehow using the methods above?
Many thanks!
John
Hi John,
To clarify, do you want to create the Author Box through Beaver Builder? Does creating it through Beaver Builder provide a Shortcode for the Author Box?
For reference, here's how it's done with GP Premium and GenerateBlocks: https://www.youtube.com/watch?v=4x6CjGOyagc
Hi Fernando,
Thanks for that video reference.
It is along those lines.
I have been working on it already - you can see on this blog:
https://seedsofthesunbyronbay.com/how-to-create-new-healthy-habits-that-stick/
Author box has been created in Beaver Builder and added to a Hook to appear after the content.
I am trying to figure out the snippet to only load the correct BB row when the correct author ID is shown.
For example:
function display_author_box() {
$author_id = 6; // Replace with the user ID you want to display
echo do_shortcode( '[fl_builder_insert_layout id=2423 user_id=' . $author_id . ']' );
}
Something like that - not 100% sure how to work that properly.
What do you think?
It might be better to reach out to Beaver Builder regarding this. This would be out of our scope of support.
OK - thanks - I figured it out a different way.
You're welcome, John! Glad you solved it!