I am creating a WooCommerce template and it should display the page content.
Obviously, Beaver pages are not normal content, the content is retrieved from alternative database table as a logical data-tree and translated into elements.
I digged into Beaver code and saw the FLBuilder::render_content.
I also realized that you have a filter, add_filter(‘the_content’, ‘FLBuilder::render_content’);
How do I render the content in Beaver way? what params does render_content expect?
Out of curiosity, while being in the template, I am in the WP loop (correct?), then why when I call the_content() function the filter hook is not called?
Had to do echo FLBuilder::render_content(get_the_content();
Still, it would be great if you add FLBuilder::render_content($post_id) or so.
Currently, I am using an ugly trick by overriding the global $post parameter:
global $post;
$post = get_post( $product_template_page_id );
You may get unexpected results from that method as it’s intended to run as a callback for “the_content” filter. Is simply calling the_content(); not working for you?