HEX
Server: Apache
System: Linux p3plmcpnl504330.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: workshopbrain (3361731)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/workshopbrain/public_html/statusplan.com/wp-content/themes/DDCM/img-map-query.php
<?php
echo '<h2>Tenant Spaces</h2><hr>';
$args = array( 'post_type' => 'tenant-space', 'category_name' => 'Tenant Space', 'orderby' => 'title', 'order' => ASC, 'posts_per_page' => 30 );
//$args = array( 'post_type' => 'imagemap_area', 'orderby' => 'title', 'order' => ASC, 'posts_per_page' => 30 );
//$args = array( 'post_type' => 'tenant-space', 'category_name' => 'Tenant Space', 'p=1460' );
//$query = new WP_Query( 'p=7' ); //I was trying to get this to work with no luck
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
//
	$prop_stat2 = get_field('property_status');
//
	if ( $prop_stat2 == 'available'){
	$prop_stat_color = '#ff0000';
	} else if ( $prop_stat2 == 'negotiation'){ 
	$prop_stat_color = '#00ffff';
	} else if ( $prop_stat2 == 'prospect'){ 
	$prop_stat_color = '#ffff00';
	} else if ( $prop_stat2 == 'loi'){ 
	$prop_stat_color = '#ff6600';
	} else if ( $prop_stat2 == 'rec'){ 
	$prop_stat_color = '#eb1e7b';
	} else { 
	$prop_stat_color = '#00ff00';
	}	
//
	//if ( $prop_stat2 == 'available'){
	//$prop_stat = 'rgba(255, 0, 0, 0.1)';
	//} else { $prop_stat = 'rgba(0, 255, 0, 0.1)'; }
//
	//$originalDate = get_field('lease_end_date');
    //$newDate = date("m-d-Y", strtotime($originalDate));
//
	//if ( $prop_stat2 == 'available'){
    //$statusText = '<p class="availableHeader"><span class="header-icons  fa fa-check"></span>Available as of ';
    //} else { $statusText = '<p class="leasedHeader"><span class="header-icons  fa fa-check"></span>Currently leased until '; }
//	
//	
	echo '<a href="';
	the_permalink();
	echo '" style="';
	echo 'color:';
	echo $prop_stat_color;
	echo ';';
	echo '">';
	the_title();
	echo '</a>';
	echo '<br>';
endwhile;
?>