How do I use an Advanced Custom Field as a Shortcode. Ive used the following code in the WordPress functions.php file but no luck.
Here is my Code:
function location_date_func( $atts ){
return "<?php the_field('location_date', 658); ?>";
}
add_shortcode( 'location_date', 'location_date_func' );
Read more here: Return ACF field as a Shortcode using WordPress Functions.php file