コード例 #1
0
ファイル: functions.php プロジェクト: ahmedelhadi/TestProject
 function property_price()
 {
     echo get_property_price();
 }
コード例 #2
0
ファイル: custom_functions.php プロジェクト: jitendra2u/MCT
function get_property_listing_price($pid)
{
    ?>

	<span class="price">
	<?php 
    if (get_property_price($pid)) {
        ?>

	<b class="sale"> <?php 
        _e(PRO_FOR_TEXT);
        ?>
 <?php 
        _e(get_post_meta($pid, 'property_type', true));
        ?>
 : </b> <?php 
        echo get_property_price($pid);
        ?>
<b> 
	<?php 
        if (get_post_meta($pid, 'property_type', true) == 'Rent') {
            echo '/ month';
        }
        ?>
 </b>
	<?php 
    }
    ?>

	</span>
<?php 
}
コード例 #3
0
    $properties_for_map['tax_query'] = array(array('taxonomy' => $wp_query->query_vars['taxonomy'], 'field' => 'slug', 'terms' => $wp_query->query_vars['term']));
}
$properties_for_map_query = new WP_Query($properties_for_map);
$properties_array_string = "";
if ($properties_for_map_query->have_posts()) {
    while ($properties_for_map_query->have_posts()) {
        $properties_for_map_query->the_post();
        if (empty($properties_array_string)) {
            $properties_array_string .= '{';
        } else {
            $properties_array_string .= ', {';
        }
        /* Property Title */
        $properties_array_string .= ' title:"' . get_the_title() . '", ';
        /* Property Price */
        $properties_array_string .= ' price:"' . get_property_price() . '", ';
        /* Property Location */
        $property_location = get_post_meta($post->ID, 'REAL_HOMES_property_location', true);
        if (!empty($property_location)) {
            $lat_lng = explode(',', $property_location);
            $properties_array_string .= ' lat:' . $lat_lng[0] . ', ';
            $properties_array_string .= ' lng:' . $lat_lng[1] . ', ';
        }
        /* Property Thumbnail */
        if (has_post_thumbnail()) {
            $image_id = get_post_thumbnail_id();
            $image_attributes = wp_get_attachment_image_src($image_id, 'property-thumb-image');
            if (!empty($image_attributes[0])) {
                $properties_array_string .= ' thumb:"' . $image_attributes[0] . '", ';
            }
        }