Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Created September 16, 2025 15:28
Show Gist options
  • Save g-maclean/dad6134de21df7270ef00b79913a9ab7 to your computer and use it in GitHub Desktop.
Save g-maclean/dad6134de21df7270ef00b79913a9ab7 to your computer and use it in GitHub Desktop.
Property Hive - Shortcode to output council tax band
// [council_tax_band]
add_shortcode('council_tax_band', 'council_tax_band_shortcode');
function council_tax_band_shortcode($atts) {
global $property;
$council_tax_band = $property->council_tax_band;
if ( !empty($council_tax_band) ) {
return '<div class="council-tax-band">Council Tax Band: ' . esc_html($council_tax_band) . '</div>';
} else {
return '<div class="council-tax-band">Council Tax Band: Not available</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment