I’ve seen that but it looks to be something that would have to be entered on every page. I want it to be global across the whole site and not have to manually place the shortcode on every page.
I found your older post on how to do this. And got it to work.
I’d like to suggest that you guys make a step by step tut for how to make and place global header or footer. I mean I had to spend a good deal of time to find your older post and read through the entire thread.
I didn’t end up using the shortcode hardcoded on the footer.php file. I used your method of:
// Add global footer to footer
add_action('fl_before_footer', 'global_footer');
function global_footer(){
echo do_shortcode('[fl_builder_insert_layout slug="page-slug"]');
};
I should add one thing for anyone that decides to try this same thing. I seriously vote against using shortcodes if all possible. If things break, and they do, then your page will be filled with a bunch of garbage. That’s why I shelled out the big bucks and purchased BB to begin with. Because it’s still functional if the plugin breaks.
That said, I sure wish you guys would give me real code to add these feature such as my own footer or header design instead of a shortcode. For the very reasons above.
And for mercy sake, please make it available to be able to make custom template pages in conjunction with the theme so, I can use it for every site I build. Because without being able to use my goto plugin of Advanced Custom Fields, I can’t make complex sites with the BB theme. Only basic ones that don’t need advance CPT’s and functionality.
You definitely can get rid of the shortcode, and use the render_query method instead. It works the exact same way as the shortcode, but since it’s a PHP code, it will output nothing if it breaks.
Unfortunately, being able to use the builder to make your own header/footer isn’t possible as of yet but we do have plans to implement something similar. The method we’re using now is just a workaround.
We’re actually working on getting post meta support to BB. You can visit our Trello board to check on stuff we’re working on. The data providers card is what will make BB support ACF.
That’s what I want to do. Not sure why I didn’t see that.
I would recommend people do this rather than use shortcodes.
Shortcodes = bad for your customers website. Because bad things happen to good design if usability, functionality, and the “what if’s” aren’t properly thought through.