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.

php to render pb content in sidebar

10 years ago · Last reply by pescadito 10 years ago

Hi support, thanks for sharing your gread siteorigin page builder!!!

I hade defined a custom post type with pb enable inside and it render the full html boxed as x
but when i try to render the content in the sidebar i get only the text content as showed in
http://tinypic.com/r/f3suoh/9

I tried php code using ‘Advanced Text Widget’ with
post_content;
echo apply_filters(‘the_content’, $p->post_content);
?>
or even ‘Custom Content Shortcode’ plugin with [content type=cblock id=542 filter=true]
or ‘Enzymes’ plugin with {[542:content]} shortcode
but i always get only the text content

Please,
how need to be the php code to render a specific id post with the full pg html boxed content inside a sidebar?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

5
  1. Greg Priday Staff 10 years, 22 days ago

    Hi Pescadito,

    One idea here would be to call the siteorigin_panels_render function directly. So something along the lines of:

    siteorigin_panels_render( $p->ID );

    I’m not 100% sure that’ll work in all situations, but it’s worth a try.

  2. pescadito 10 years, 22 days ago

    Awesome!!! That worked!!!
    but was: echo siteorigin_panels_render( $p->ID );
    Thanks a lot.

    Regards, Pescadito

  3. Greg Priday Staff 10 years, 22 days ago

    Aaah, oops, yeah, I left out the echo there.

  4. pescadito 10 years, 21 days ago

    ​Sorry Greg but that line only worked in the sidebar if i view the same custom post,
    not in another​

    i mean,
    if sidebar have
    $id=542;
    $p=get_page($id);
    echo siteorigin_panels_render( $p->Id);
    that only work when i view http://flypress.tk/inmo01/cblock/?p=542 but not work when i view http://flypress.tk/inmo01/cblock/?p=434

    please, what i need to reset the query for it work with the view of any other post?

  5. pescadito Private 10 years, 21 days ago

    This is a private message.

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