Plugin Author
Brecht
(@brechtvds)
You should be able to add shortcodes in the HTML & Code block, is that not working for you? We also have a Custom Field block that allows you to output any custom field associated with the post.
It is possible to use our plugin hooks to alter the output of template blocks with PHP. What changes are you looking for exactly?
Kind regards,
Brecht
Thread Starter
Chrissy
(@paperkawaii)
ok..
So in my posts, I have a custom field, which you add a shortcode into.
If I bring that custom field into a ‘custom field’ box, the shortcode doesn’t render.
Hope you get what I mean…
The other way to do it, would be to allow PHP scripts to be added inside the HTML block.
So you could add a ‘IF’ statement.. such as:
if this_meta exists { do_this (and do the shortcode etc) }
else {something else}
🙂 great plugin though..
Have it working nicely here: http://www.gilliandeaneart.com
Plugin Author
Brecht
(@brechtvds)
Well if you’re comfortable using PHP we do have plugin hooks available you can use to alter the output.
For example, adding this code to your theme’s functions.php file should make sure the shortcode is executed in the custom field block:
function wpupg_custom_field_shortcode( $output, $post ) {
$output = do_shortcode( $output );
return $output;
}
add_filter( 'wpupg_output_grid_block_custom-field', 'wpupg_custom_field_shortcode', 10, 2 );
Brecht
Thread Starter
Chrissy
(@paperkawaii)
thanks thats exactly what I was looking for! 🙂