</div> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php $my_post_array = array("-99"); $my_post_args = array('post_type' => 'classified', 'post__not_in' => array($cpostid), 'post_status' => 'publish', 'posts_per_page' => 3, 'tax_query' => array(array('taxonomy' => 'classified_cat', 'field' => 'id', 'terms' => $classifiedCat))); $my_querys = null; $my_querys = new WP_Query($my_post_args); if ($my_querys->have_posts()) { while ($my_querys->have_posts()) { $my_querys->the_post(); if (check_post_expiration(get_the_ID(), "classified") > 0) { array_push($my_post_array, get_the_ID()); } } } wp_reset_query(); query_posts(array('post_type' => 'classified', 'post__not_in' => array($cpostid), 'post__in' => $my_post_array, 'post_status' => 'publish', 'posts_per_page' => '3', 'tax_query' => array(array('taxonomy' => 'classified_cat', 'field' => 'id', 'terms' => $classifiedCat)))); if (have_posts()) { while (have_posts()) { the_post(); $classId = get_the_ID(); // Classified id $clsPrice = get_post_meta($classId, "price", true); $web_site = get_post_meta($classId, "web_site", true); $clsPhone = get_post_meta($classId, "phone", true); $clsLocation = get_post_meta($classId, "location", true);
<?php if (isset($_GET['search']) && !empty($_GET['search'])) { ?> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php $my_post_array = array("-99"); $my_post_args = array('post_type' => 'business', 's' => $str, 'post_status' => 'publish', 'posts_per_page' => -1); $my_querys = null; $my_querys = new WP_Query($my_post_args); if ($my_querys->have_posts()) { while ($my_querys->have_posts()) { $my_querys->the_post(); if (check_post_expiration(get_the_ID(), "business") > 0) { array_push($my_post_array, get_the_ID()); } } } wp_reset_query(); query_posts(array('post_type' => 'business', 's' => $str, 'post_status' => 'publish', 'posts_per_page' => -1, 'post__in' => $my_post_array)); if (have_posts()) { while (have_posts()) { the_post(); $businessId = get_the_ID(); // Business id $busweb_site = get_post_meta($businessId, "website", true); $busPhone = get_post_meta($businessId, "phone", true); $emailAddress = get_post_meta($businessId, "emailaddress", true); $busclsAddress = get_post_meta($businessId, "address", true);
<div class="title pull-left"> <span>Похожие Мероприятия</span> </div> </div> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="row event"> <?php $my_post_array = array("-99"); $my_post_args = array('post_type' => 'event', 'post_status' => 'publish', 'posts_per_page' => 3, 'tax_query' => array(array('taxonomy' => 'event_cat', 'field' => 'id', 'terms' => $eventCat))); $my_querys = null; $my_querys = new WP_Query($my_post_args); if ($my_querys->have_posts()) { while ($my_querys->have_posts()) { $my_querys->the_post(); if (check_post_expiration(get_the_ID(), "event") > 0) { array_push($my_post_array, get_the_ID()); } } } wp_reset_query(); query_posts(array('post_type' => 'event', 'post__not_in' => array($postID), 'post_status' => 'publish', 'posts_per_page' => '3', 'post__in' => $my_post_array, 'tax_query' => array(array('taxonomy' => 'event_cat', 'field' => 'id', 'terms' => $eventCat)))); if (have_posts()) { while (have_posts()) { the_post(); $eventId = get_the_ID(); // Event id $website = get_post_meta($eventId, "website", true); $evPhone = get_post_meta($eventId, "phone", true); $evLocation = get_post_meta($eventId, "location", true); $evPrice = get_post_meta($eventId, "price", true);