Archived topic
GP and Beaver Builder - shortcodes and hooks
5 replies · Started by Andrew on August 8, 2016
Hi
I'm using GP and Beaver Builder.
I put the following code in the "Before Header" hook.
1: [fl_builder_insert_layout slug="before-header"]
2: <b>Test</b>
Line 1 is a shortcode that displays a saved row from Beaver Builder.
When I'm logged in, both lines run. I see the saved row and the rendered HTML.
When I'm not logged in, I only see the rendered HTML.
Any help appreciated.
Thanks.
Andrew
Hi Andrew,
Are you using any caching plugins? If so, try clearing your cache.
If not, try executing the shortcode like this:
<?php echo do_shortcode( '[fl_builder_insert_layout slug="before-header"]' ); ?>
Make sure to check the "Execute PHP" button.
Let me know :)
Hi Tom
My bad. The row was saved on a page that was set to "Private". Learn something new every day.
Your PHP code worked too.
Thanks.
Andrew
@Andrew - Thank you so much for putting me onto using BB shortcodes with the GP hooks! That opens up a whole lot of possibilities! :)
Cheers!
Lyle
Glad you got it working :)
@Lyle - all good. The combination of GP theme, GP hooks and BB - awesome! :)