Hi everyone.
I’m using Pinegrow to create custom blocks for a theme and having some trouble understanding how to add custom functions in Pinegrow Wordpress actions.
The functions work fine when added to the exported blocks php files directly. But fails when added to the actions custom code field in the actions panel. Wich isn’t ideal since it gets overwritten on export.
Is there something special regarding the logic or formatting that I’m missing?
My function looks like this
<?php
$users = get_field("users");
if( $users ): ?>
<ul class="volunteers-list">
<?php foreach( $users as $user ): ?>
<li>
<a href="<?php echo esc_attr($user->user_url); ?>"><?php echo $user->display_name; ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
Can’t find anything mentions for this in the documentation
Would be super thankful for any help on this
Cheers