Useful for presenting an ACF field within WordPress Blocks.
add_shortcode( 'ccom_acf_field', function( $atts ) {
if( ! function_exists( 'get_field' ) || empty( $atts['field'] ) ) {
return;
}
return get_field( $atts['field'] );
} );
Useful for presenting an ACF field within WordPress Blocks.
add_shortcode( 'ccom_acf_field', function( $atts ) {
if( ! function_exists( 'get_field' ) || empty( $atts['field'] ) ) {
return;
}
return get_field( $atts['field'] );
} );
Contact me. I can help with fitting projects or refer to my partner.
All code snippets are licensed GPLv2 (or later) matching WordPress licensing.
Except when otherwise stated in writing the copyright holders and/or other parties provide the program as-is without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
Disclaimer of warranty