Created
September 16, 2025 15:28
-
-
Save g-maclean/dad6134de21df7270ef00b79913a9ab7 to your computer and use it in GitHub Desktop.
Property Hive - Shortcode to output council tax band
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // [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