Home>Support>php to render pb content in sidebar

php to render pb content in sidebar

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. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 7 months ago Greg Priday
    Hi, I Work Here

    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. 8 years, 7 months ago pescadito

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

    Regards, Pescadito

  3. 8 years, 7 months ago Greg Priday
    Hi, I Work Here

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

  4. 8 years, 7 months ago pescadito

    ​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. 8 years, 7 months ago Private Message - pescadito

    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.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More