Page builder not outputting anything
Hello,
Thanks for creating such great plugin!
However on my new template PB is not outputting anything (or it displays just post content, which I don’t want) Im not using the default loop, just this:
$screenContent = apply_filters( 'the_content', $screen->post_content ); $screenContent = str_replace( ']]>', ']]>', $screenContent );
$screenContent is outputted to frontend.
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
4Hi Marcin
Page Builder uses some standard WordPress content filters, which aren’t ever applied to $post->post_content. Either you’d need to set up the post data with setup_postdata, or you’d need to use the following technique to apply all the necessary filters.
http://wordpress.stackexchange.com/questions/9667/get-wordpress-post-content-by-post-id
Sorry, but this renders the same code… :(
$content_post = get_post($screen->ID); $content = $content_post->post_content; $content = apply_filters('the_content', $content); $screenContent = str_replace(']]>', ']]>', $content);Im outputting $screenContent. Normal (from normal editor) content is displaying correctly.
I will check this out, thank you!
W dniu 2015-03-09 o 14:41, Greg Priday pisze:
Okay I got it working. I changed my foreach with the standard loop:
$content = get_the_content(); $content = apply_filters('the_content', $content); $screenContent = str_replace(']]>', ']]>', $content);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.