Load Beaver Builder layouts and templates from PHP.
Load Beaver Builder layouts, templates and rows from PHP and render the content from specific post.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?php global $post; $post_ID = 123; $module_ID = 234; $post = get_post( $post_ID ); // Set the post ID to render from FLBuilderModel::set_post_id( $post_ID ); // Use the same post ID on Beaver FLBuilder::enqueue_layout_styles_scripts_by_id( $module_ID ); // Load related styles and scripts. FLBuilder::render_content_by_id( $module_ID ); // Layout, Template or row ID FLBuilderModel::reset_post_id(); // Reset post to original on Beaver wp_reset_query(); // Reset query on WP ?> |