This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Get formatted output from Page builder for viewing

9 years ago · Last reply by Greg Priday 9 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Greg Priday Staff 9 years, 7 months ago

    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.

Have a different question or issue?

Start New Thread