私はプロパティリストサイトを持っており、検索結果をフィルタリングするコードについて助けが必要です。以下のコードには、契約タイプが「南部オレゴン」のすべてのプロパティが含まれています。契約タイプ=「medford-office」にも含めることを希望します。コードに追加する方法を教えてもらえますか?ここで 複数のオプションをPHPクエリに追加する
はコードです:私はこれがあなたのフィルタリングシステムの中核である期待<?php
echo $div; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts(array('post_type'=>'property','post_status'=>'publish','paged'=>$paged,
'author'=>$agent, 'property-contract-type'=>'southern-oregon'));
if(have_posts()):while(have_posts()):the_post();
$property_images = get_post_meta(get_the_ID(),'imic_property_sights',false);
$total_images = count($property_images);
$property_term_type = '';
$property_area = get_post_meta(get_the_ID(),'imic_property_area',true);
$property_baths = get_post_meta(get_the_ID(),'imic_property_baths',true);
$property_beds = get_post_meta(get_the_ID(),'imic_property_beds',true);
$property_parking = get_post_meta(get_the_ID(),'imic_property_parking',true);
$property_address = get_post_meta(get_the_ID(),'imic_property_site_address',true);
$property_city = get_post_meta(get_the_ID(),'imic_property_site_city',true);
$property_price = get_post_meta(get_the_ID(),'imic_property_price',true);
$contract = wp_get_object_terms(get_the_ID(), 'property-contract-type',
array('fields'=>'ids'));
$property_id = get_post_meta(get_the_ID(),'imic_property_site_id',true);
$property_area_location = wp_get_object_terms(get_the_ID(), 'city-type');
$sl = '';
$total_area_location = count($property_area_location);
$num = 1;
foreach($property_area_location as $sa) {
$conc = ($num!=$total_area_location)?'->':'';
$sl .= $sa->name.$conc; $num++;
}
// We get Longitude & Latitude By Property Address
$property_longitude_and_latitude=get_post_meta(get_the_ID(),'imic_lat_long',true);
if(!empty($property_longitude_and_latitude)){
$property_longitude_and_latitude = explode(',',
$property_longitude_and_latitude);
}else{
$property_longitude_and_latitude=getLongitudeLatitudeByAddress($property_address);
}
global $imic_options;
$currency_symbol = imic_get_currency_symbol($imic_options['currency-select']);
$src = wp_get_attachment_image_src(get_post_thumbnail_id(),'150-100-size');
if(!empty($src)):
$image_container= '<span class ="property_image_map">'.$src[0].'</span>';
else:
$image_container='';
endif;
if(!empty($contract)) {
$term = get_term($contract[0], 'property-contract-type'); $property_term_type = $term->name;
}
if($design_type=='listing') {
?>
プログラマーを雇ったことはありますか? – melpomene
私にはこれを組み込んだプログラマーがいますが、今は利用できません。私はライブサイトを修正するためのコードをすばやく編集しようとしています。私は助けに感謝します、これはおそらく非常に単純な質問であると私は理解しています。 – Rob
プログラマーを起動してください。 – trincot