Home › Forums › Pro Support › Geodirectory Listings › Reply To: Geodirectory Listings
September 8, 2020 at 1:43 am
#19116
Participant
Thanks Tom.
I struggled as I was able to call the custom field but couldn’t get the format. However, it turned out that I could echo call the shortcode and it now works perfectly.
add_action( 'wpsp_after_title', function() {
$meta = get_post_meta( get_the_ID(), 'geodir_business_hours', true );
if ( $meta ) {
echo do_shortcode( '[gd_post_meta key="business_hours" show="value"]' );
}
} );