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.

Page builder not outputting anything

10 years ago · Last reply by Marcin Ciarka 10 years ago

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

4
  1. Greg Priday Staff 10 years, 11 months ago

    Hi 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

    • Marcin Ciarka 10 years, 11 months ago

      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.

  2. Marcin Ciarka 10 years, 11 months ago

    I will check this out, thank you!

    W dniu 2015-03-09 o 14:41, Greg Priday pisze:

  3. Marcin Ciarka 10 years, 11 months ago

    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.

Have a different question or issue?

Start New Thread