Skip to content

Instantly share code, notes, and snippets.

@simbasounds
Created July 15, 2016 20:49
Show Gist options
  • Save simbasounds/63b616a0ba229c0bcea4b403f9bf3b6d to your computer and use it in GitHub Desktop.
Save simbasounds/63b616a0ba229c0bcea4b403f9bf3b6d to your computer and use it in GitHub Desktop.
WordPress template < - > Beaver Builder layout template. Incl. hook for custom BB module.
<?php
add_action('fl_dynamic_switchboard', 'my_template_code');
function my_template_code() {
/* Your template loop code here */
}
add_action('fldts_fl_template','fldts_get_fl_template');
function fldts_get_fl_template() {
FLBuilder::render_query( array(
'post_type' => 'fl-builder-template',
'p' => 1234 /* Your BB Template ID here */
) );
}
get_header();
do_action( 'fldts_fl_template' );
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment