Im changing some stuff in a theme and for that reason i need to output page content in different spots of the website
With a normal WordPress page i use the following code
$include = get_page($page_id); echo apply_filters('the_content', $include->post_content);
This works fine with normal pages, but with PageBuilder pages the post_content variable is empty. All i have figured out is that there seem to be stored something relating to the content in postmeta table under the page id and key ‘panels_data’, but its serialized and im not sure how to get it out formatted correctly for viewing.
How can i get the page content of page that has been created with pagebuilder?
Hi Daniel
Sorry for the late reply here.
So you have a few options here. The one I’d really recommend is setting up the page you’re trying to output as the global post, then using the_content function directly. This will take care of everything for you in the background.
Here is a fairly detailed guide on doing that: https://codex.wordpress.org/Function_Reference/setup_postdata