Home>Support>Get formatted output from Page builder for viewing

Get formatted output from Page builder for viewing

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?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 2 months ago Greg Priday
    Hi, I Work Here

    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

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More