Contact your chosen DJ, or go back and select another
Search by town or postcode, compare wedding specialists, and send direct enquiries in minutes
I am covered by Public Liability Insurance with MDJN
I am happy to provide a copy of the policy, just ask
function mdjn_geodir_tags_badge_shortcode($atts) {
// Get GD post ID properly
if (function_exists('geodir_get_current_post_id')) {
$post_id = geodir_get_current_post_id();
} else {
global $post;
$post_id = $post ? $post->ID : 0;
}
if (!$post_id) return '';
$atts = shortcode_atts(array(
'bg_color' => '#0073aa',
'txt_color' => '#ffffff',
'separator' => ' ',
), $atts);
// IMPORTANT: try both taxonomies
$taxonomies = ['post_tags', 'gd_place_tag'];
$tags = [];
foreach ($taxonomies as $tax) {
$terms = get_the_terms($post_id, $tax);
if (!empty($terms) && !is_wp_error($terms)) {
$tags = $terms;
break;
}
}
if (empty($tags)) return '';
$output = '';
foreach ($tags as $tag) {
$output .= '' . esc_html($tag->name) . '' . $atts['separator'];
}
return $output;
}
add_shortcode('mdjn_tags', 'mdjn_geodir_tags_badge_shortcode');






