Home>Support>Render So Content from custom field

Render So Content from custom field

I’m using this 3rd Party Plugin () which enables SO Builder as a ACF field.
Everything works fine, but (only) the headline widget does not render completely (only renders the wrapper).

I tested around and found, if I have the same content in a post as the content, it works fine.

So I would like to render the content from the custom field with the SO engine.

I figured something like this could work:

$mycustomcontent = SiteOrigin_Panels::renderer()->render( false, true, get_field('acf_page_builder_field',$postid) );

But this gives me nothing.

Here is what is in the database for the field “acf_page_builder_field”. It looks like it is not serialized. Can this be an issue.
It works for all other widgets, except the headline.


Maybe someone can give me a hint in the right direction to render this the right way! :)

Thanks Sascha

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 17 days, 16 hours ago polimehr

    Hey, I dug deeper into this.
    I managed to get the general rendering done:

    $sop_content = json_decode(get_field('acf_page_builder_field',$postid, false),true);
    $mainBeschreibung = SiteOrigin_Panels::renderer()->render( false, true, $sop_content );

    The issue might be because the plugin I use (forgot to link in the above post): https://wordpress.org/plugins/acf-page-builder-field/
    saves the widget configs as json and not serialized data?

    I’m puzzled why it works for all widgets except headline. Maybe the way it works with the template file in the headline directory?

    Thanks for every 2 Cent you can spare ;)

  2. 17 days, 15 hours ago Alex S Hi, I Work Here

    Hi Sascha,

    The code you’ve provided looks fine to me. The render method $panels_data parameter should be non-serialized data so what you’re doing is correct.

    Can you please provide me with an export of your layout? This will allow me to run some tests using it. You can do this by opening your the page builder button and click the layout button in the Page Builder toolbar. Then click import/export and then click download. Please upload the export to a 3rd party file hosting site such as WeTransfer (no email is required).

    Kind regards,

  3. 16 days, 22 hours ago polimehr

    Hi Aley,
    you looking into this is very much appreciated! :)


    Here is an example of the layout I have in the ACF page builder field. Everything looks great except the headline widget on the very top of the layout. The html at that instance is like this:

    <div class="container panel-row-style panel-row-style-for-2317-0"><div id="pgc-2317-0-0" class="panel-grid-cell"><div id="panel-2317-0-0-0" class="so-panel widget widget_sow-headline panel-first-child panel-last-child" data-index="0"><div class="panel-widget-style panel-widget-style-for-2317-0-0-0"><div class="so-widget-sow-headline so-widget-sow-headline-default-bb424dd754ae"><div class="sow-headline-container ">

    Which looks like it does not render the innerpart. :(

    Best regards Sascha

  4. 15 days, 22 hours ago Alex S Hi, I Work Here

    Hi Sascha,

    Thanks. I’ve had a look over the provided layout and I don’t see any issues with that should prevent it from rendering.
    Do any errors get logged when you attempt to render the layout?

    Kind regards,

  5. 15 days, 20 hours ago polimehr

    I have an error in the php log. But this might be related to something else.

    2020/11/19 14:41:44 [error] 28121#28121: *205047 FastCGI sent in stderr: “PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘create_post_type_html5’ not found or invalid function name in /var/www/web/wp-includes/class-wp-hook.php on line 287PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘enable_threaded_comments’ not found or invalid function name in /var/www/web/wp-includes/class-wp-hook.php on line 289” while reading response header from upstream, client:, server: mydomain.de, request: “GET /folder/angebottest/?angebot=8047 HTTP/2.0”, upstream: “fastcgi://unix:/var/lib/php7.0-fpm/web849.sock:”, host: “www.mydomain.de”

  6. 14 days, 20 hours ago polimehr

    BTW, the page in question is here:
    The missing headline is right below the top slider.

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More