Hello, I have a little problem, I try to get the content of a page.
This is for the footer, I created an option in the customizer to use the default footer widgets or select a page.
That way footer can be created with the page builder by siteorigin.
I tried several things, only 2 work but there is a problem.
1. With the following code:
echo do_shortcode( get_post_field( ‘post_content’, $page_id ) );
The content of the page is displayed, but there is not the div (panel-grid-cell, so-panel) that wraps the content.
2. With the following code:
echo do_shortcode( the_content( $page_id ) );
With this code, it works well, the div are present, but it shows me the contents of the page I am, if I am on the contact page, it shows me the contents of the contact page.
Can you help me?
Thank you a lot :)
Hi Nick
Rather than use a page created with Page Builder, I’d suggest telling your users they can use a Page Builder Layout Widget in their footer. This is essentially an entire Page Builder as a standard WordPress widget.
This will give your users the best experience. They’ll be able to create all that footer content without leaving the customizer.
Hello, you solved my problem and simplified solution, thank you :)
Very glad to hear it Nick!