Created
October 4, 2022 10:45
-
-
Save propertyhive/e5899fbc2a75bfe3b5dde00146a2ae79 to your computer and use it in GitHub Desktop.
This file contains 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
add_action( 'propertyhive_before_search_results_loop_item_title', 'add_flag', 5 ); | |
function add_flag() | |
{ | |
global $property; | |
$flag = $property->availability; | |
if ( $property->marketing_flag != '' ) | |
{ | |
$flag = $property->marketing_flag; | |
} | |
if ( $flag != '' ) | |
{ | |
echo '<div class="flag flag-' . sanitize_title($flag) . '">' . $flag . '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment