The only way I could figure out how to get do_shortcode
working was by using WP_Query
.
<?php
// get current site
$args = [
'p' => $post_id,
'post_type' => 'any'
];
// site wp query
$oSite = new WP_Query($args);
?>
<?php if ( $oSite->have_posts() ): ?>
<?php while($oSite->have_posts()): $oSite->the_post() ?>
<div id="gform_ajax_wrapper_<?=$form_id?>">
<?=do_shortcode('[gravityform id="'.$form_id.'" title="false" description="false" ajax="true" update]')?>
</div>
<?php endwhile; ?>
<?php else: ?>
No site found. <?=$post_id?>
<?php endif; ?>