<?php /** * The template for displaying posts in the Status post format * * @package WordPress * @subpackage Javo_Directory * @since Javo Themes 1.0 */ global $javo_tso, $javo_custom_item_tab, $javo_custom_item_label, $javo_favorite; $javo_meta_query = new javo_GET_META(get_the_ID()); $detail_images = @unserialize($javo_meta_query->_get('detail_images', null)); ?> <!-- #### <div class="row"> in Arichive File --> <div class="col-md-4 col-sm-6"> <div id="post-<?php the_ID(); ?> " <?php post_class('javo-rotate'); ?> > <div class="javo-rotate-front"> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-box', array('class' => 'img-responsive')); } else { printf('<img src="%s" style="width:288px; max-height:236px" class="img-responsive">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png'));
public function javo_gallery_function($atts = array(), $content = "") { global $javo_tso; javo_get_script("jquery.mixitup.min.js", "mixitup", "2.1.4"); extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'have_terms' => '', 'display_type' => 'parent', 'max_amount' => 0, 'rand_order' => null), $atts)); $javo_this_gallery_args = array("post_type" => 'item', "post_status" => 'publish', "posts_per_page" => (int) $max_amount > 0 ? (int) $max_amount : -1); if ($rand_order == 'use') { $javo_this_gallery_args['orderby'] = 'rand'; } $have_terms = @explode(',', $have_terms); $javo_have_terms = array(); if (!empty($have_terms)) { foreach ($have_terms as $term) { if ((int) $term <= 0) { continue; } $javo_have_terms[] = get_term($term, 'item_category'); // IF NOT ONLY PARENTS if ($display_type != 'parent') { $javo_sub_cat = get_terms('item_category', array('parent' => $term, 'hide_empty' => false)); foreach ($javo_sub_cat as $cat) { $javo_have_terms[] = $cat; } } } } $javo_this_get_term_args = array(); $javo_this_get_term_args['hide_empty'] = false; if ($display_type == 'parent' || $display_type == '') { $javo_this_get_term_args['parent'] = 0; } $javo_gallery_terms = !empty($javo_have_terms) ? $javo_have_terms : get_terms("item_category", $javo_this_get_term_args); $javo_get_terms_ids = array(); wp_enqueue_scripts('jQuery-Rating'); ob_start(); echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div id="javo-gall"> <div class="javo-gallery-navi"> <button class="javo-gall-filter" data-filter="all"><?php _e('ALL', 'javo_fr'); ?> </button> <?php foreach ($javo_gallery_terms as $term) { printf('<button class="javo-gall-filter gallery-terms-btn" data-filter=".javo-gallery-term-%s">%s</button>', $term->term_id, strtoupper($term->name)); $javo_get_terms_ids[] = $term->term_id; } ?> </div> <div class="javo-gallery"> <?php $javo_this_gallery_args['tax_query'][] = array('taxonomy' => 'item_category', 'field' => 'term_id', 'terms' => $javo_get_terms_ids); $javo_gallery_posts = new WP_Query($javo_this_gallery_args); if ($javo_gallery_posts->have_posts()) { while ($javo_gallery_posts->have_posts()) { $javo_gallery_posts->the_post(); $javo_pm = new javo_GET_META(get_the_ID()); $javo_this_include_terms = $javo_pm->cat('item_category', false, false, true); $javo_this_terms = ''; if ($javo_this_include_terms != false) { foreach ($javo_this_include_terms as $terms) { $javo_this_terms .= ' javo-gallery-term-' . $terms->term_id; } } else { $javo_this_terms = ' javo-gallery-term-all'; } ?> <div class="javo-gall-mix<?php echo $javo_this_terms; ?> "> <div class="javo-gallery-wrap"> <a href="<?php the_permalink(); ?> "> <div class="javo-gallery-shadow"></div> <?php if (has_post_thumbnail()) { echo get_the_post_thumbnail(get_the_ID(), 'javo-box', array('class' => 'img-responsive')); } else { printf('<img src="%s" class="img-responsive wp-post-image" style="width:100%%; height:244px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> <div class="javo-gallery-term-content-title"> <?php echo get_the_title(get_the_ID()); ?> <!-- <span class="glyphicon glyphicon-th-list"></span> --> </div> <div class="javo-gallery-term-content-inform"> <div class="javo-gallery-term-content-category"> <?php echo $javo_pm->cat('item_category', __('No Category', 'javo_fr')); ?> </div><!-- javo-gallery-term-content-category --> <div class="javo-gallery-term-content-rating"> <?php printf('<div class="javo-gallery-on-hover-rating" data-score="%.1f"></div>', (double) get_post_meta(get_the_ID(), 'rating_average', true)); ?> </div> <!-- javo-gallery-term-content-rating --> </div> <!-- javo-gallery-trem-content-inform --> </a> </div><!-- wrap --> <div class="javo-left-overlay bg-red"> <div class="javo-txt-meta-area admin-color-setting"><i class="glyphicon glyphicon-map-marker"></i> <?php echo $javo_pm->cat('item_location', __("No Location", "javo_fr"), true); ?> </div> <!-- javo-txt-meta-area --> <div class="corner-wrap"> <div class="corner admin-color-setting"></div> <div class="corner-background admin-color-setting"></div> </div> <!-- corner-wrap --> </div> </div> <!-- javo-gallery-term --> <?php } // End While } else { _e('No Items Found.', 'javo_fr'); } // End If wp_reset_query(); ?> </div> </div> <script type="text/javascript"> jQuery(document).ready(function($){ "use strict"; $('.javo-gallery').mixItUp({ selectors:{ filter : '.javo-gall-filter' , target : '.javo-gall-mix' } }); jQuery(function($){ $('.javo-gallery-on-hover-rating').each(function(){ $(this).raty({ starOff: '<?php echo JAVO_IMG_DIR; ?> /star-off-s.png' , starOn: '<?php echo JAVO_IMG_DIR; ?> /star-on-s.png' , starHalf: '<?php echo JAVO_IMG_DIR; ?> /star-half-s.png' , half: true , readOnly: true , score: $(this).data('score') }).css('width', ''); }); $(document).on('click', 'button.filter', function(){ $(window).trigger('resize'); }); }); }); </script> <?php return ob_get_clean(); }
function javo_map_brief_callback() { global $javo_tso, $javo_custom_item_label, $javo_custom_item_tab; $javo_query = new javo_ARRAY($_POST); if ((int) $javo_query->get('post_id', 0) <= 0) { return false; } $javo_meta_query = new javo_GET_META($javo_query->get('post_id')); $javo_this_author_avatar_id = get_the_author_meta('avatar'); $javo_this_author_name = sprintf('%s %s', get_the_author_meta('first_name'), get_the_author_meta('last_name')); ob_start(); ?> <div class="row"> <div class="col-md-12 text-center"> <a href="<?php echo get_permalink($javo_query->get('post_id')); ?> "> <?php echo $javo_meta_query->image('thumbnail', array('class' => 'img-circle img-inner-shadow')); ?> </a> </div><!-- /.col-md-4 --> </div><!-- /.row --> <div class="row"> <div class="col-md-12 text-center"> <a href="<?php echo get_permalink($javo_query->get('post_id')); ?> "> <h1><?php echo $javo_meta_query->post_title; ?> </h1> </a> </div> </div><!-- /.row --> <div class="row"> <div class="col-md-6 text-right"> <ul class="list-unstyled"> <li><?php printf('%s : %s', __('Category', 'javo_fr'), $javo_meta_query->cat('item_category', __('No Category', 'javo_fr'))); ?> </li> <li><?php printf('%s : %s', __('Location', 'javo_fr'), $javo_meta_query->cat('item_location', __('No Location', 'javo_fr'))); ?> </li> <?php if ($javo_custom_item_tab->get('ratings', '') == '') { ?> <li><?php printf('%s : %.1f /%d', __($javo_custom_item_label->get('ratings', 'Ratings'), 'javo_fr'), (double) $javo_meta_query->_get('rating_average'), (int) $javo_meta_query->get_child_count('ratings', 'rating_parent_post_id', $javo_query->get('post_id'))); ?> </li> <?php } ?> <?php if ($javo_custom_item_tab->get('reviews', '') == '') { ?> <li><?php printf('%s : %d', __($javo_custom_item_label->get('reviews', 'Reviews'), 'javo_fr'), (int) $javo_meta_query->get_child_count('reviews', 'parent_post_id', $javo_query->get('post_id'))); ?> </li> <?php } ?> </ul> </div><!-- /.col-md-6 --> <div class="col-md-6"> <ul class="list-unstyled"> <li><?php printf('%s : %s', __('Phone', 'javo_fr'), $javo_meta_query->get('phone')); ?> </li> <li><?php printf('%s : %s', __('Email', 'javo_fr'), $javo_meta_query->get('email')); ?> </li> <li><?php printf('%s : %s', __('Website', 'javo_fr'), $javo_meta_query->get('website')); ?> </li> </ul> </div><!-- /.col-md-6 --> </div><!-- /.row --> <div class="row"> <div class="col-md-12 text-center alert alert-light-gray"> <?php echo $javo_meta_query->excerpt(400); ?> </div><!-- /.col-md-12 --> </div><!-- /.row --> <?php $javo_bf_output = ob_get_clean(); echo json_encode(array("html" => $javo_bf_output)); exit; }
</script> </div> <!-- my-page-title --> </div> <!-- row --> </div> <!-- panel-heading --> <div class="panel-body"> <!-- Starting Content --> <?php $javo_this_items_args = array('post_type' => 'item', 'posts_per_page' => 10, 'post_status' => array('publish', 'pending'), 'author' => get_current_user_id(), 'paged' => max(1, get_query_var('paged'))); $javo_this_items = new WP_Query($javo_this_items_args); if ($javo_this_items->have_posts()) { while ($javo_this_items->have_posts()) { $javo_this_items->the_post(); $javo_rating = new javo_rating(get_the_ID()); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_parent_id = get_post_meta(get_the_ID(), 'rating_parent_post_id', true); ?> <div class="row content-panel-wrap-row"> <div class="col-md-2 col-sm-3 col-xs-3 thumb"> <a href="<?php echo get_the_permalink($javo_this_parent_id); ?> /"> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-avatar', array('class' => 'img-responsive img-cycle')); } else { printf('<img src="%s" class="img-cycle" style="width:100%%; Height:125px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); }
public function javo_featured_items_callback($atts, $content = "") { extract(shortcode_atts(['title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'random' => ''], $atts)); $javo_this_items_args = ['post_type' => 'item', 'post_status' => 'publish', 'posts_per_page' => 5, 'orderby' => rand, 'meta_query' => [['key' => 'javo_this_featured_item', 'compare' => '=', 'value' => 'use']]]; $javo_this_results = []; $javo_this_results_key = 0; $javo_this_items = new WP_Query($javo_this_items_args); if ($javo_this_items->have_posts()) { while ($javo_this_items->have_posts()) { $javo_this_items->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_iamge_id = get_post_thumbnail_id(); if ($javo_this_results_key == 0) { $javo_this_results[$javo_this_results_key]['image'] = wp_get_attachment_image($javo_this_iamge_id, 'javo-large'); } else { $javo_this_results[$javo_this_results_key]['image'] = wp_get_attachment_image($javo_this_iamge_id, 'javo-small'); } $javo_this_results[$javo_this_results_key]['title'] = get_the_title(); $javo_this_results[$javo_this_results_key]['meta'] = sprintf('%s / %s ', $javo_meta_query->cat('item_location', __('No location', 'javo_fr')), $javo_meta_query->cat('item_category', __('No Category', 'javo_fr'))); $javo_this_results[$javo_this_results_key]['permalink'] = get_permalink(); $javo_this_results_key++; } // End While } // End If ob_start(); ?> <?php echo apply_filters('javo_shortcode_title', $title, $sub_title, ['title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';']); ?> <div id="javo-featured-items-wrap" class="row"> <div class="col-md-6 left-big-img"> <?php if (!empty($javo_this_results[0])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[0]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[0]['title']; ?> </div> <?php echo $javo_this_results[0]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[0]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[0]['meta']; ?> </div> </div> <!-- /.item-captions --> </div> <!-- /.item-cover-inner --> </div> <!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div> <!-- /.col-md-6 --> <div class="col-md-6 right-small-img"> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[1])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[1]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[1]['title']; ?> </div> <?php echo $javo_this_results[1]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[1]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[1]['meta']; ?> </div> </div> <!-- /.item-captions --> </div> <!-- /.item-cover-inner --> </div> <!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div> <!-- /.col-md-6 --> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[2])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[2]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[2]['title']; ?> </div> <?php echo $javo_this_results[2]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[2]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[2]['meta']; ?> </div> </div> <!-- /.item-captions --> </div> <!-- /.item-cover-inner --> </div> <!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div> <!-- /.col-md-6 --> </div> <!-- /.row --> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[3])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[3]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[3]['title']; ?> </div> <?php echo $javo_this_results[3]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[3]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[3]['meta']; ?> </div> </div> <!-- /.item-captions --> </div> <!-- /.item-cover-inner --> </div> <!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div> <!-- /.col-md-6 --> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[4])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[4]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[4]['title']; ?> </div> <?php echo $javo_this_results[4]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[4]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[4]['meta']; ?> </div> </div> <!-- /.item-captions --> </div> <!-- /.item-cover-inner --> </div> <!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div> <!-- /.col-md-6 --> </div> <!-- /.row --> </div> <!-- /.col-md-6 --> </div><!-- /#javo-featured-items-wrap --> <?php wp_reset_query(); $content = ob_get_clean(); return $content; }
public static function javo_slide_search_callback($atts, $content = "") { global $javo_tso, $javo_custom_item_tab; self::$load_script = true; extract(shortcode_atts(array("items" => 4, 'search_type' => 'horizontal', 'background_size' => 'auto', 'background_position_x' => 'left', 'background_position_y' => 'top', 'background_repeat' => 'no-repeat', 'height' => '300', 'hidden_elements' => '', 'hidden_form' => false, 'title_size' => '25', 'cat_loc_size' => '20'), $atts)); $javo_item_search_slider_args = array('post_type' => 'item', 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => array(array('key' => 'javo_this_featured_item', 'compare' => '=', 'value' => 'use'))); $javo_item_search_hide_el = explode(',', $hidden_elements); $javo_item_search_slider = new wp_query($javo_item_search_slider_args); ob_start(); ?> <div id="<?php echo $search_type == 'vertical' ? 'javo-box-bg-search' : 'javo-slide-search'; ?> " class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators list-unstyled"> <?php for ($i = 0; $i < $javo_item_search_slider->found_posts; $i++) { printf('<li data-target="%s" data-slide-to="%s" class="%s"></li>', $search_type == 'vertical' ? '#javo-box-bg-search' : '#javo-slide-search', $i, $i == 0 ? 'active' : ''); } ?> </ol> <div class="<?php echo $search_type == 'vertical' ? 'background-search-box' : 'slider-search-box'; ?> "> <div class="inner"> <div class="inner_wrap"> <?php if ($javo_tso->get('page_item_result', 0) > 0) { if ($hidden_form != 'hidden') { switch ($search_type) { case 'horizontal': ?> <form class="navbar-form navbar-left" role="search" method="post" action="<?php echo apply_filters('javo_wpml_link', $javo_tso->get('page_item_result')); ?> "> <div class="slider-search-part-wrap"> <?php if (!in_Array('txt_keyword', $javo_item_search_hide_el)) { ?> <div class="form-group"> <input type="text" class="form-control input-large" placeholder="<?php _e("Keyword", "javo_fr"); ?> " name="keyword"> </div> <?php } ?> <?php if (!in_Array('sel_category', $javo_item_search_hide_el)) { ?> <div class="form-group"> <select name="category"> <option value=""><?php _e('Category', 'javo_fr'); ?> </option> <?php echo apply_filters('javo_get_selbox_child_term_lists', 'item_category', null, 'select', 0, 0, 0, "-"); ?> </select> </div><!-- form-Group --> <?php } ?> <?php if (!in_Array('sel_location', $javo_item_search_hide_el)) { ?> <div class="form-group"> <select name="location"> <option value=""><?php _e('Location', 'javo_fr'); ?> </option> <?php echo apply_filters('javo_get_selbox_child_term_lists', 'item_location', null, 'select', 0, 0, 0, "-"); ?> </select> </div><!-- form-Group --> <?php } ?> <button type="submit" class="btn btn-primary admin-color-setting"><i class="glyphicon glyphicon-map-marker"></i> <?php _e('Search on Map', 'javo_fr'); ?> </button> </div><!-- slider-search-part-wrap --> </form> <?php break; case 'vertical': default: ?> <form class="navbar-form navbar-left" role="search" method="post" action="<?php echo apply_filters('javo_wpml_link', $javo_tso->get('page_item_result')); ?> "> <div class="slider-search-part-wrap"> <h3><?php _e('Search', 'javo_fr'); ?> </h3> <?php if (!in_Array('txt_keyword', $javo_item_search_hide_el)) { ?> <div class="form-group"><input type="text" class="form-control input-sm" placeholder=<?php _e("Search", "javo_fr"); ?> name="keyword"></div> <?php } ?> <?php if (!in_Array('sel_category', $javo_item_search_hide_el)) { ?> <div class="form-group"> <select name="category"> <option value=""><?php _e('Category', 'javo_fr'); ?> </option> <?php echo apply_filters('javo_get_selbox_child_term_lists', 'item_category', null, 'select', 0, 0, 0, "-"); ?> </select> </div><!-- form-Group --> <?php } ?> <?php if (!in_Array('sel_location', $javo_item_search_hide_el)) { ?> <div class="form-group"> <select name="location"> <option value=""><?php _e('Location', 'javo_fr'); ?> </option> <?php echo apply_filters('javo_get_selbox_child_term_lists', 'item_location', null, 'select', 0, 0, 0, "-"); ?> </select> </div><!-- form-Group --> <?php } ?> <div class="search-part-inner-text"><?php _e('Search location and categories to displayed on the map.', 'javo_fr'); ?> </div> <input type="submit" class="btn btn-primary admin-color-setting" onclick="this.form.submit();" value="<?php _e('Submit', 'javo_fr'); ?> "> </div><!-- slider-search-part-wrap --> </form> <?php } // End Switch } } else { ?> <div class="alert alert-warning text-center"> <strong><?php _e('Results Page has not yet been setup.', 'javo_fr'); ?> </strong> <p> <?php _e('Please check Theme Settings > Item Pages > Search Result', 'javo_fr'); ?> </p> </div> <?php } // End If ?> </div> <!-- inner_wrap --> </div> <!-- inner --> </div><!-- slider-search-box --> <div class="slide-search-bottom-shadow"></div> <!-- Wrapper for slides --> <div class="carousel-inner"> <?php wp_reset_query(); if ($javo_item_search_slider->have_posts()) { $i = 0; while ($javo_item_search_slider->have_posts()) { $javo_item_search_slider->the_post(); $javo_rating = new javo_RATING(get_the_ID()); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_brand_label = trim($javo_meta_query->get_events_brand_label()); ?> <div class="item<?php echo $i == 0 ? ' active' : ''; ?> " style="height:<?php echo $height; ?> px;"> <?php if (has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $javo_slide_search_css_args = array('background-image' => sprintf('url("%s")', $large_image_url[0]), 'background-repeat' => $background_repeat, 'background-size' => $background_size, '-webkit-background-size' => $background_size, '-moz-background-size' => $background_size, '-ms-background-size' => $background_size, '-o-background-size' => $background_size, 'background-attachment' => 'fixed', 'background-position-x' => $background_position_x, 'background-position-y' => $background_position_y, 'height' => '100%'); $javo_slide_search_css = ''; foreach ($javo_slide_search_css_args as $attribute => $value) { $javo_slide_search_css .= $attribute . ':' . $value . '; '; } ?> <div class="slide-bg-images" style='<?php echo $javo_slide_search_css; ?> '> <div style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-image: url('<?php echo JAVO_THEME_DIR; ?> /assets/images/pattern-dots-single.png'); background-repeat: repeat; z-index: 1;"></div> <a href="<?php the_permalink(); ?> "> <div class="<?php echo $search_type == 'vertical' ? 'background-slide-title hidden-sm hidden-xs' : 'carousel-caption'; ?> "> <h4 class='javo-slider-search-meta hidden-sm hidden-xs' style="font-size:<?php echo $cat_loc_size; ?> px;"> <?php printf('%s / %s', $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')), $javo_meta_query->cat('item_category', 'No Category')); ?> </h4> <div class="search-slider-title-wrap"> <h2 style="font-size:<?php echo $title_size; ?> px;"><?php the_title(); ?> </h2> </div> </div><!-- carousel-caption --> </a> <div class="row item-author-info <?php echo $search_type; ?> "> <?php if (!in_Array('cle_event', $javo_item_search_hide_el)) { ?> <div class="col-md-4"><a href="<?php the_permalink(); ?> .#item-events"> <?php if (!empty($javo_brand_label) && $javo_custom_item_tab->get('events', '') == '') { ?> <div class="event_info"> <div class="item-author-info-circle-border"><?php echo $javo_brand_label; ?> </div> </div> <?php } else { printf('<div> </div>'); } ?> </a></div> <?php } ?> <?php if (!in_Array('cle_category', $javo_item_search_hide_el)) { $javo_cat_featured = wp_get_attachment_image_src($javo_meta_query->featured_cat(), 'javo-tiny'); $javo_cat_featured = $javo_cat_featured[0]; ?> <div class="col-md-4"> <a href="<?php the_permalink(); ?> "><img src="<?php echo $javo_cat_featured; ?> "> <div class="item-author-info-circle-border"></div></a> </div> <?php } ?> <?php if (!in_Array('cle_rating', $javo_item_search_hide_el)) { ?> <div class="col-md-4"> <?php if ($javo_custom_item_tab->get('ratings', '') == '') { ?> <a href="<?php the_permalink(); ?> .#item-ratings"> <div class="rating_score text-center"> <?php echo $javo_rating->parent_rating_average; ?> </div> <div class="item-author-info-circle-border"></div> </a> <?php } ?> </div> <?php } ?> </div><!-- item-author-info --> </div> <!-- slide-bg-images --> <?php } ?> </div><!-- item --> <?php $i++; } // End While } else { ?> <div class="item active"> <img src="" alt="..."> <div class="carousel-caption"> <h3><?php _e('No Items Found.', 'javo_fr'); ?> </h3> <p></p> </div><!-- carousel-caption --> </div><!-- item --> <?php } // End IF wp_reset_query(); ?> </div><!-- carousel-inner --> <!-- Controls --> <a class="left carousel-control" href="#<?php echo $search_type == 'vertical' ? 'javo-box-bg-search' : 'javo-slide-search'; ?> " role="button" data-slide="prev"> <i class="glyphicon glyphicon-chevron-left"></i> </a> <a class="right carousel-control" href="#<?php echo $search_type == 'vertical' ? 'javo-box-bg-search' : 'javo-slide-search'; ?> " role="button" data-slide="next"> <i class="glyphicon glyphicon-chevron-right"></i> </a> </div> <!-- javo-slide-search --> <script type="text/javascript"> jQuery(function($){ "use strict"; var javo_slide_serach = { init: function(){ this.events(); $('.background-search-box, .slider-search-box').find('.form-group > select').each(function() { $(this).chosen({ width:'100%', search_contains:1 }); }); }, events:function(){ var $object = this; $('body').on('click', '.javo-this-post-views li a', function(){ $(this).closest('.btn-group').children('button:first-child').text( $(this).text() ); $object.options.ppp = $(this).data('views'); $object.run(); }); $('.javo-this-filter').each( function(c, v){ var _this = $(this); $(this).on('click', 'li[data-filter]', function(){ $(this).closest('.btn-group').children('button:first-child').text( $(this).data('origin-title') ); $(this).closest('ul').next().val( $(this).val() ); }); }); } }; javo_slide_serach.init(); }); </script> <?php $content = ob_get_clean(); return $content; }
function javo_post_list_callback() { // Wordpress Queries global $wp_query, $javo_tso, $javo_favorite, $javo_custom_item_label, $javo_custom_item_tab; $video_media = array("youtube" => "//www.youtube.com/embed/", "vimeo" => "//player.vimeo.com/video/", "screenr" => "//www.youtube.com/embed/", "dailymotion" => "//www.youtube.com/embed/", "metacafe" => "//www.youtube.com/embed/"); $javo_query = new javo_ARRAY($_POST); if ($javo_query->get('lang', null) != null) { global $sitepress; if (!empty($sitepress)) { $sitepress->switch_lang($javo_query->get('lang'), true); } } // List view tyope $mode = $javo_query->get('type', null); $post_type = $javo_query->get('post_type', 'item'); $p = $javo_query->get('post_id', null); $ppp = $javo_query->get('ppp', 10); $page = $javo_query->get('page', 1); $tax = $javo_query->get('tax', 10); $term_meta = $javo_query->get('term_meta', 10); $meta = array(); $args = array('post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page' => $ppp, 'paged' => $page); if ((int) $p > 0) { $args['p'] = $p; } if ($tax != NULL && is_Array($tax)) { foreach ($tax as $key => $value) { if ($value != "") { $args['tax_query']['relation'] = "AND"; $args['tax_query'][] = array("taxonomy" => $key, "field" => "term_id", "terms" => $value); } } } if ($term_meta != NULL && is_Array($term_meta)) { foreach ($term_meta as $key => $value) { if ($value != "") { $args['meta_query']['relation'] = "AND"; $args['meta_query'][] = array("key" => $key, "value" => (int) $value, "compare" => ">="); } } } $args["s"] = $javo_query->get('keyword', null); // Not found image featured url $noimage = JAVO_IMG_DIR . "/no-image.png"; ob_start(); ?> <script type="text/javascript"> if(typeof(window.jQuery) != "undefined") { jQuery(document).ready(function($) { "use strict"; $(".javo_hover_body").css({ "position":"absolute", "top":"0", "left":"0", "z-index":"2", "width":"100%", "height":"100%", "padding":"10px", "margin": "0px", "backgroundColor":"rgba(0, 0, 0, 0.4)", "display":"none" }); $(".javo_img_hover") .css({ "position":"relative", "overflow":"auto", "display":"inline-block" }).hover(function(){ $(this).find(".javo_hover_body").fadeIn("fast"); }, function(){ $(this).find(".javo_hover_body").clearQueue().fadeOut("slow"); }); }); }; </script> <?php switch ($mode) { case 2: $posts = new WP_Query($args); ?> <div class="row javo-item-grid-listing"> <?php $i = 0; ## Thumbnail Type ################### if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $meta = array('strong' => $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')), "featured" => $javo_meta_query->cat('item_location', __('No Location', 'javo_fr'))); ?> <div class="col-md-4 col-sm-6 col-xs-6 pull-left"> <div class="panel panel-default panel-relative"> <?php $detail_images = (array) @unserialize(get_post_meta(get_the_ID(), "detail_images", true)); $detail_images[] = get_post_thumbnail_id(get_the_ID()); if (!empty($detail_images)) { echo '<div class="javo_detail_slide">'; $javo_this_image_meta = wp_get_attachment_image_src($detail_images, 'large'); $javo_this_image = $javo_this_image_meta[0]; ?> <?php echo '<ul class="slides list list-unstyled">'; foreach ($detail_images as $index => $image) { $javo_this_image_meta = wp_get_attachment_image_src($image, 'full'); $javo_this_image = $javo_this_image_meta[0]; ?> <li> <u href="<?php echo $javo_this_image; ?> " style="cursor:pointer;"> <?php $javo_this = wp_get_attachment_image($image, "javo-box-v", false); if ($javo_this) { echo $javo_this; } else { printf('<img src="%s" class="img-responsive wp-post-image" style="width:100%%; height:201px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> </u> </li> <?php } echo '</ul>'; echo '</div>'; } ?> <div class="panel-body"> <div class="col-md-12"> <a href="<?php the_permalink(); ?> " class="javo-tooltip javo-igl-title" title="<?php the_title(); ?> "> <div> <h2 class="panel-title text-center"> <strong> <?php echo javo_str_cut(get_the_title(), 120); ?> </strong> </h2> <div class="text-center"><?php echo $meta['strong']; ?> </div> </div> </a> <ul class="list list-unstyled"> <li class="text-center text-excerpt javo-grid-listing-excerpt"><?php echo javo_str_cut(get_the_excerpt(), 150); ?> </li> <li class="text-center"> <h2 class="javo-sns-wrap social-wrap"> <i class="sns-facebook" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="facebook javo-tooltip" title="<?php _e('Share Facebook', 'javo_fr'); ?> "></a> </i> <i class="sns-twitter" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="twitter javo-tooltip" title="<?php _e('Share Twitter', 'javo_fr'); ?> "></a> </i> <i class="sns-heart"> <a class="javo-tooltip favorite javo_favorite<?php echo $javo_favorite->on(get_the_ID(), ' saved'); ?> " data-post-id="<?php the_ID(); ?> " title="<?php _e('Add My Favorite', 'javo_fr'); ?> "></a> </i> </h2> </li> </ul><!-- List group --> </div> </div> <div class="javo-left-overlay"> <div class="javo-txt-meta-area admin-color-setting"> <?php echo $meta['featured']; ?> </div> <!-- javo-txt-meta-area --> <div class="corner-wrap"> <div class="corner admin-color-setting"></div> <div class="corner-background admin-color-setting"></div> </div> <!-- corner-wrap --> </div><!-- javo-left-overlay --> </div> <!-- /.panel --> </div><!-- /.col-sm-4 --> <?php $i++; echo $i % 3 == 0 ? '<p style="clear:both;"></p>' : ''; } // End While } // End If break; case 4: $posts = new WP_Query($args); if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_rating = new javo_rating(get_the_ID()); $pd = strtotime(get_the_date()); $meta = array('column1' => $post_type == "item" ? $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')) : get_the_author_meta('user_login'), 'column2' => $post_type == "item" ? $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')) : get_the_author_meta('user_login'), 'column3' => $post_type == "item" ? (int) $javo_meta_query->get_child_count('jv_events') : get_the_author_meta('user_login'), 'column4' => $post_type == "item" ? (int) $javo_meta_query->get_child_count('review') : get_the_author_meta('user_login'), 'column5' => sprintf(' %s', $post_type == "item" ? $javo_meta_query->get('item_category', __('No Category', 'javo_fr')) : get_the_author_meta('user_login')), 'column6' => sprintf('<i class="%s"></i> %s', $post_type == "item" ? "icon-status" : "javo-con status", $post_type == "item" ? $javo_meta_query->get('item_category', __('No Category', 'javo_fr')) : get_the_author_meta('user_login')), 'features' => sprintf('<span class="%s"></span> %s', $post_type == "item" ? "glyphicon glyphicon-user" : "", $post_type == "item" ? $javo_meta_query->get('item_category', __('No Category', 'javo_fr')) : get_the_author_meta('user_login')), "month" => sprintf('%.1f', (double) $javo_meta_query->_get('rating_average', 0)), "day" => '/ ' . (int) $javo_meta_query->get_child_count('ratings', 'rating_parent_post_id')); ?> <div class="row pretty_blogs" id="mini-album-listing"> <div class="col-md-4 col-sm-5 col-xs-6 blog-thum-box"> <?php $detail_images = (array) @unserialize(get_post_meta(get_the_ID(), "detail_images", true)); $detail_images[] = get_post_thumbnail_id(get_the_ID()); if (!empty($detail_images)) { ?> <div class="javo_detail_slide"> <ul class="slides list-unstyled"> <?php foreach ($detail_images as $index => $image) { $javo_this_image_meta = wp_get_attachment_image_src($image, 'full'); $javo_this = wp_get_attachment_image($image, "javo-box-v", false); if (!$javo_this) { $javo_this = sprintf('<img src="%s" class="img-responsive wp-post-image" style="width:100%%; height:219px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } $javo_this_image = $javo_this_image_meta[0]; printf('<li><u href="%s">%s</u></li>', $javo_this_image, $javo_this); } ?> </ul> <?php if ($javo_custom_item_tab->get('ratings', '') == '') { ?> <div class="javo-mini-album-rating-area"> <div class="javo-rating-registed-score" data-score="<?php echo $javo_rating->parent_rating_average; ?> "></div> </div> <?php } ?> </div> <?php } ?> <div class=""> <span class="down-text"><?php //echo $meta['month']; ?> </span> <span class="up-text"><?php //echo $meta['day']; ?> </span> </div> </div> <!-- col-md-5 --> <div class="col-md-8 col-sm-7 col-xs-6 blog-meta-box"> <div class="blog-meta-box-arrow"></div> <h2 class="title"><a href="<?php echo get_permalink(get_the_ID()); ?> "><?php the_title(); ?> </a></h2> <div class="excerpt"><?php echo javo_str_cut(get_the_excerpt(), 240); ?> <a href="<?php the_permalink(); ?> ">[<?php _e('MORE', 'javo_fr'); ?> ]</a></div> <div class="row"> <div class="col-md-12 javo-blog-meta-tags"> <div class="pull-left javo-tooltip" title="<?php _e('Category', 'javo_fr'); ?> "> <ul class="pagination pagination-sm no-margin pagination-dark pagination-upper"> <li class="active"><a href="#"><?php echo $meta['column1']; ?> </a></li> </ul> </div> <div class="pull-left javo-tooltip" title="<?php _e('Location', 'javo_fr'); ?> "> <ul class="pagination pagination-sm no-margin pagination-dark pagination-upper"> <li class="active"><a href="#"><?php echo $meta['column2']; ?> </a></li> </ul> </div> <?php if ($javo_custom_item_tab->get('events', '') == '') { ?> <div class="pull-left"> <ul class="pagination pagination-sm no-margin pagination-dark"> <li><a href="#" class="javo-accent bold-number"><?php echo $meta['column3']; ?> </a></li> <li class="active"><a href="#"><?php echo $javo_custom_item_label->get('events', __("Events", 'javo_fr')) . "(s)"; ?> </a></li> </ul> </div> <?php } ?> <?php if ($javo_custom_item_tab->get('reviews', '') == '') { ?> <div class="pull-left"> <ul class="pagination pagination-sm no-margin pagination-dark"> <li><a href="#" class="javo-accent bold-number"><?php echo $meta['column4']; ?> </a></li> <li class="active"><a href="#"><?php echo $javo_custom_item_label->get('reviews', __("Reviews", 'javo_fr')) . "(s)"; ?> </a></li> </ul> </div> <?php } ?> <div class="pull-right"> <span class="javo-sns-wrap social-wrap"> <i class="sns-facebook" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="facebook javo-tooltip" title="<?php _e('Share Facebook', 'javo_fr'); ?> "></a> </i> <i class="sns-twitter" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="twitter javo-tooltip" title="<?php _e('Share Twitter', 'javo_fr'); ?> "></a> </i> <i class="sns-heart"> <a class="javo-tooltip favorite javo_favorite<?php echo $javo_favorite->on(get_the_ID(), ' saved'); ?> " data-post-id="<?php the_ID(); ?> " title="<?php _e('Add My Favorite', 'javo_fr'); ?> "></a> </i> </span> </div> </div><!-- Col-md-12 --> </div> <!-- property-meta --> </div> <!-- col-md-7 --> </div> <!-- row --> <?php } // End While } // End If break; case 11: $posts = new WP_Query($args); $javo_variable_integer = 0; ?> <div class="row" id="box-listing"> <?php if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_meta_string = array('strong' => get_comments_number(get_the_ID()), 'featured' => $javo_meta_query->cat('category', __('No Category', 'javo_fr')), 'type' => sprintf('<span class="glyphicon glyphicon-user"></span> %s ( %s )', get_the_author_meta('display_name'), esc_attr(get_the_date(__('M d, Y', 'javo_fr'))))); ?> <div class="col-md-6 col-sm-6 col-xs-6 box-wraps"> <div class="panel panel-default"> <div class="panel-body"> <div class="main-box item-wrap1"> <div class="row blog-wrap-inner"> <div class="col-md-5 col-sm-5 col-xs-5 img-wrap"> <div class="javo_img_hover"> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-box', array('class' => 'img-responsive', 'style' => 'width:100%;')); } else { printf('<img src="%s" class="img-responsive wp-post-image">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> </div> <!-- javo_img_hover --> </div> <!-- col-md-5 --> <div class="col-md-7 col-sm-7 col-xs-7"> <div class="detail"> <h3><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h3> <p class="expert"><?php echo javo_str_cut(get_the_excerpt(), 120); ?> </p> </div> </div> <!-- col-md-7 --> </div> <!-- row --> </div> <!-- main-box --> </div><!-- Panel Body --> <ul class="list-group"> <li class="list-group-item"> <div class="row"> <div class="col-md-9 col-sm-9 col-xs-8 javo-box-listing-meta"> <?php echo $javo_meta_string['type']; ?> </div> <div class="col-md-3 col-sm-3 col-xs-4 text-right"> <span class="javo-sns-wrap social-wrap"> <i class="sns-facebook" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="facebook javo-tooltip" title="<?php _e('Share Facebook', 'javo_fr'); ?> "></a> </i> <i class="sns-twitter" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="twitter javo-tooltip" title="<?php _e('Share Twitter', 'javo_fr'); ?> "></a> </i> </span> </div> <!-- col-6-md --> </div><!-- row --> </li> </ul> <div class="javo-left-overlay"> <div class="javo-txt-meta-area admin-color-setting"> <?php echo $javo_meta_string['featured']; ?> </div> <!-- javo-txt-meta-area --> <div class="corner-wrap"> <div class="corner"></div> <div class="corner-background"></div> </div> <!-- corner-wrap --> </div><!-- javo-left-overlay --> </div><!-- Panel Wrap --> </div> <!-- col-lg-6 --> <?php $javo_variable_integer++; echo $javo_variable_integer % 2 == 0 ? '<p class="clearfix"></p>' : ''; } // End While } // End IF ?> </div> <?php break; case "listers": $posts = query_posts($args); ## Blog Calender Type ################# foreach ($posts as $post) { setup_postdata($post); $javo_list_str = new get_char($post); $author = get_userdata($post->post_author); if (has_post_thumbnail($post->ID)) { $thumbnail = get_the_post_thumbnail($post->ID, "javo-avatar"); } else { $thumbnail = $noimage; } ?> <!--<div class="row">--> <div class="col-md-3" id="listers-box-list"> <div class="panel panel-default"> <div class="panel-heading"> <div class="lister-pic"> <a href="<?php echo get_permalink($post->ID); ?> "> <?php $img_src = wp_get_attachment_image_src(get_user_meta($author->ID, "avatar", true), "javo-avatar"); if ($img_src != "") { printf("<img src='%s'>", $img_src[0]); } ?> </a> <div class="text-rb-meta"> <?php printf("%s %s", number_format($javo_list_str->get_author_item_count()), __("items", "javo_fr")); ?> </div> </div> </div> <!-- panel-heading --> <ul class="list-group"> <li class="list-group-item"><h3 class="panel-title"><span class="glyphicon glyphicon-user"></span> <?php echo $author->first_name; ?> <?php echo $author->last_name; ?> </h3></li> <li class="list-group-item"><?php echo javo_str_cut($javo_list_str->a_meta('description'), 130); ?> </li> <li class="list-group-item"> <a href="http://facebook.com/<?php echo $javo_list_str->a_meta('facebook'); ?> " target="_blank"><i class="fa fa-facebook"></i></a> <a href="http://twitter.com/<?php echo $javo_list_str->a_meta('twitter'); ?> " target="_blank"><i class="fa fa-twitter"></i></a> </li> </ul><!-- List group --> </div><!-- panel --> </div> <!-- col-md-3 --> <?php } break; case "new_list": $posts = new WP_Query($args); ?> <div class="body-content"> <div class="container"> <div class="row"> <div class="col-md-12"> <!-- grid/list --> <div id="products" class="row list-group"> <?php if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); $javo_this_author_avatar_id = get_the_author_meta('avatar'); $javo_rating = new javo_rating(get_the_ID()); ?> <div class="item col-md-4 javo-animation x1 javo-left-to-right-100"> <div class="panel panel-default item-list-box-listing"> <div class="panel-body"> <div class="main-box blog-wrap1"> <div class="row blog-wrap-inner"> <div class="col-md-12img-wrap"> <div class="javo_img_hover" style="position: relative; display: inline-block;"> <a href="<?php the_permalink(); ?> "> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-box-v', array('class' => 'group list-group-image item-thumbs img-responsive')); } ?> <div class="img-on-ratings text-right"> <div class="javo-rating-registed-score" data-score="<?php echo $javo_rating->parent_rating_average; ?> "></div> </div> <div class="javo_hover_body" style="position: absolute; top: 0px; left: 0px; z-index: 2; width: 100%; height: 100%; padding: 10px; margin: 0px; display: none; opacity: 0.3151841979620183; background-color: rgba(0, 0, 0, 0.4);"> <div class="javo_hover_content" style="cursor: pointer; display: table; width: 100%; height: 100%;" data-href="<?php the_permalink(); ?> "> <div class="javo_hover_content_link" style="display: table-cell; color: rgb(239, 239, 239); vertical-align: middle; font-size: 2em; text-align: center;"><i class="glyphicon glyphicon-plus"></i></div></div> <!-- javo_hover_content --> </div> <!-- javo_hover_body --> </a> </div> <!-- javo_img_hover --> </div> <!-- col-md-12 --> </div> <!-- row --> </div> <!-- main-box --> </div><!-- Panel Body --> <ul class="list-group"> <li class="list-group-item"> <div class="row"> <div class="col-md-8"> <?php echo javo_str_cut(get_the_title(), 20); ?> </div> <div class="col-md-4 text-right"> <div class="social-wrap javo-type-11-share"> <span class="javo-sns-wrap"> <i class="sns-facebook" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="facebook"></a> </i> <i class="sns-twitter" data-title="<?php the_title(); ?> " data-url="<?php the_permalink(); ?> "> <a class="twitter"></a> </i> <i class="sns-heart"> <a class="favorite javo_favorite<?php echo $javo_favorite->on(get_the_ID(), ' saved'); ?> " data-post-id="<?php the_ID(); ?> "></a> </i> </span> </div> <!-- sc-social-wrap --> </div> <!-- col-6-md --> </div><!-- row --> </li> <!-- list-group-item --> </ul> <!-- list-group --> <div class="panel-footer options-wrap"> <div class="row"> <ul class="options"> <li class="col-md-6 col-sm-6 col-xs-6"><i class="javo-con category"></i> <?php echo javo_get_cat(get_the_ID(), 'item_category', __('No Category', 'javo_fr')); ?> </li> <li class="col-md-6 col-sm-6 col-xs-6 text-right"><i class="javo-con location"></i> <?php echo javo_get_cat(get_the_ID(), 'item_location', __('No Location', 'javo_fr')); ?> </li> </ul> </div> </div><!-- panel-footer --> <div class="javo-left-overlay"> <div class="javo-txt-meta-area"> <?php echo javo_get_cat(get_the_ID(), 'item_category', __('No Category', 'javo_fr')); ?> </div> <!-- javo-txt-meta-area --> <div class="corner-wrap"> <div class="corner"></div> <div class="corner-background"></div> </div> <!-- corner-wrap --> </div><!-- javo-left-overlay --> </div> <!-- panel --> </div> <!-- item col-md-4 --> <?php } // Close while } else { } // Emd While ?> <!-- // grid/list --> </div> </div> </div> </div> <?php break; default: _e('Error', 'javo_fr'); } $big = 999999999; // need an unlikely integer wp_reset_query(); echo "<div class='javo_pagination'>" . paginate_links(array('base' => "%_%", 'format' => '?paged=%#%', 'current' => $page, 'total' => $posts->max_num_pages)) . "</div>"; $content = ob_get_clean(); // Markers $javo_this_info_window_contents = new WP_Query($args); $markers = array(); if ($javo_this_info_window_contents->have_posts()) { while ($javo_this_info_window_contents->have_posts()) { $javo_this_info_window_contents->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_author_avatar_id = get_the_author_meta('avatar'); $javo_this_author_name = sprintf('%s %s', get_the_author_meta('first_name'), get_the_author_meta('last_name')); ob_start(); ?> <div class="javo_somw_info"> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-12"> <h4><?php the_title(); ?> </h4> <ul class="list-unstyled"> <li><div class="prp-meta"><?php echo $javo_meta_query->get('phone'); ?> </div></li> <li><div class="prp-meta"><?php echo $javo_meta_query->get('mobile'); ?> </div></li> <li><div class="prp-meta"><?php echo $javo_meta_query->get('website'); ?> </div></li> <li><div class="prp-meta"><?php echo $javo_meta_query->get('email'); ?> </div></li> </ul> </div><!-- /.col-md-8 --> <div class="col-md-6 col-sm-6 hidden-xs"> <div class="thumb"> <a href="<?php the_permalink(); ?> " target="_blank"> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-map-thumbnail'); } else { printf('<img src="%s" style="width:150px; height:165px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> </a> <div class="img-in-text"><?php echo $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')); ?> </div> <div class="javo-left-overlay"> <div class="javo-txt-meta-area"><?php echo $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')); ?> </div> <div class="corner-wrap"> <div class="corner"></div> <div class="corner-background"></div> </div> <!-- corner-wrap --> </div> <!-- javo-left-overlay --> </div> <!-- thumb --> </div><!-- /.col-md-4 --> </div><!-- /.row --> </div> <!-- javo_somw_info --> <?php $infoWindow = ob_get_clean(); $latlng = array('lat' => get_post_meta(get_the_ID(), 'jv_item_lat', true), 'lng' => get_post_meta(get_the_ID(), 'jv_item_lng', true)); $javo_set_icon = ''; $javo_marker_term_id = wp_get_post_terms(get_the_ID(), 'item_category'); if (!empty($javo_marker_term_id)) { $javo_set_icon = get_option('javo_item_category_' . $javo_marker_term_id[0]->term_id . '_marker', ''); if ($javo_set_icon == '') { $javo_set_icon = $javo_tso->get('map_marker', ''); } } if (!empty($latlng['lat']) && !empty($latlng['lng'])) { $markers[] = array('id' => 'mid_' . get_the_ID(), 'lat' => $latlng['lat'], 'lng' => $latlng['lng'], 'info' => array('content' => $infoWindow, 'post_title' => get_the_title()), 'icon' => $javo_set_icon); } } // End While } // End If // Not found results ob_start(); ?> <div class="row"> <div class="col-md-12 text-center"> <?php _e('No result found. Please try again', 'javo_fr'); ?> </div> </div> <?php $blank_content = ob_get_clean(); $result = array("result" => "success", "html" => $posts->found_posts > 0 ? $content : $blank_content, "markers" => $markers); echo json_encode($result); exit(0); }
<?php /** * The template for displaying posts in the Status post format * * @package WordPress * @subpackage Javo_Directory * @since Javo Themes 1.0 */ global $javo_tso, $javo_custom_item_tab, $javo_custom_item_label, $javo_favorite; $javo_meta_query = new javo_GET_META(get_the_ID()); $detail_images = @unserialize($javo_meta_query->_get('detail_images', null)); ?> <!-- #### <div class="row"> in Arichive File --> <!-- <div class="col-md-6"> <div id="post-<?php the_ID(); ?> " <?php post_class('javo-rotate'); ?> > <div class="javo-rotate-front"> <?php if (has_post_thumbnail()) { the_post_thumbnail('javo-box', array('class' => 'img-responsive')); } else { printf('<img src="%s" style="width:288px; max-height:230px" class="img-responsive">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png'));
public static function javo_review_metabox_callback($post) { $javo_meta_query = new javo_GET_META($post); $javo_get_items_args = array('post_type' => 'item', 'post_status' => 'publish', 'showposts' => -1); $javo_get_items = get_posts($javo_get_items_args); ob_start(); ?> <table class="form-table"> <tr> <th><?php _e('Target Item', 'javo_fr'); ?> </th> <td> <select name="javo_event[parent_post_id]"> <option value=""><?php _e('No Select', 'javo_fr'); ?> </option> <?php if (!empty($javo_get_items)) { foreach ($javo_get_items as $item) { setup_postdata($item); printf('<option value="%s"%s>%s</option>', $item->ID, $javo_meta_query->_get('parent_post_id', 0) == $item->ID ? ' selected' : '', $item->post_title); } // End Foreach } // End If ?> </select> </td> </tr> <tr></tr></table> <?php ob_end_flush(); }
public function main($atts = array(), $content = "") { wp_enqueue_style('javo-events-masonry-css', JAVO_THEME_DIR . '/library/shortcodes/masonry/javo-masonry.css', '1.0'); wp_enqueue_script('javo-events-masonry-scripts', JAVO_THEME_DIR . "/library/shortcodes/masonry/jquery.isotope.min.js", array('jquery'), '1.0'); extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff'), $atts)); $javo_events_masonry_terms = get_terms("jv_events_category", array('hide_empty' => false)); $javo_this_gallery_args = array("post_type" => 'jv_events', "post_status" => 'publish', "posts_per_page" => -1); $javo_events_gallery_posts = new WP_Query($javo_this_gallery_args); ob_start(); ?> <?php echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div class="javo-events-masonry"> <ul class="javo-event-masonry-cnt" data-option-key="filter"> <li class="selected"><a data-option-value="*"><?php _e('All', 'javo_fr'); ?> </a></li> <?php $javo_integer = 0; foreach ($javo_events_masonry_terms as $term) { $javo_integer++; printf('<li><a data-option-value="%s">%s</a></li>', '.t' . $term->term_id, strtoupper($term->name)); } ?> </ul> <div class="fs_blog_module is_masonry"> <?php if ($javo_events_gallery_posts->have_posts()) { while ($javo_events_gallery_posts->have_posts()) { $javo_events_gallery_posts->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_parent_post = get_post(get_post_meta(get_the_ID(), 'parent_post_id', true)); $javo_this_parent_permalink = get_permalink($javo_parent_post->ID) . '#item-events'; $javo_this_current_term = $javo_meta_query->cat('jv_events_category', '', true, true); ?> <div class="blogpost_preview_fw element <?php echo 't' . $javo_this_current_term; ?> " data-category="<?php echo $javo_this_current_term; ?> "> <div class="fw_preview_wrapper stuff"> <div class="gallery_item_wrapper"> <a href="<?php echo $javo_this_parent_permalink; ?> " > <?php the_post_thumbnail('large', array('class' => 'fw_featured_image')); ?> </a> </div> <div class="grid-port-cont"> <h6> <div class="pull-left event-title"><a href="<?php echo $javo_this_parent_permalink; ?> " ><?php the_title(); ?> </a></div> <div class="pull-right event-tag"> <?php echo $javo_meta_query->_get('brand'); ?> </div> <div class="clearfix"></div> </h6> <!--<h6><?php //echo $javo_parent_post->post_title; ?> </h6> <h6><?php //echo javo_str_cut(strip_tags($javo_parent_post->post_content), 100); ?> </h6>--> <!--<h6 class="event-tags"><span><?php echo $javo_meta_query->_get('brand'); ?> </span></h6>--> </div> </div> </div> <?php } // End While } // End If wp_reset_query(); ?> </div> </div> <script type="text/javascript"> /* SORTING */ jQuery(function(){ "use strict"; if (jQuery('.fs_blog_module').size() > 0) { var $container = jQuery('.fs_blog_module'); } else { var $container = jQuery('.fs_grid_portfolio'); } $container.isotope({ itemSelector : '.element' }); var $optionSets = jQuery('.javo-event-masonry-cnt'), $optionLinks = $optionSets.find('a'); $optionLinks.click(function(){ var $this = jQuery(this); // don't proceed if already selected if ( $this.parent('li').hasClass('selected') ) { return false; } var $optionSet = $this.parents('.javo-event-masonry-cnt'); $optionSet.find('.selected').removeClass('selected'); $optionSet.find('.fltr_before').removeClass('fltr_before'); $optionSet.find('.fltr_after').removeClass('fltr_after'); $this.parent('li').addClass('selected'); $this.parent('li').next('li').addClass('fltr_after'); $this.parent('li').prev('li').addClass('fltr_before'); // make option object dynamically, i.e. { filter: '.my-filter-class' } var options = {}, key = $optionSet.attr('data-option-key'), value = $this.attr('data-option-value'); // parse 'false' as false boolean value = value === 'false' ? false : value; options[ key ] = value; if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) { // changes in layout modes need extra logic changeLayoutMode( $this, options ) } else { // otherwise, apply new options $container.isotope(options); } return false; }); if (jQuery('.fs_blog_module').size() > 0) { jQuery('.fs_blog_module').find('img').load(function(){ $container.isotope('reLayout'); }); } else { jQuery('.fs_grid_portfolio').find('img').load(function(){ $container.isotope('reLayout'); }); } }); </script> <?php return ob_get_clean(); }
public function javo_featured_items_callback($atts, $content = "") { self::$load_script = true; extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'random' => ''), $atts)); global $javo_tso; $javo_this_items_args = array('post_type' => 'item', 'post_status' => 'publish', 'posts_per_page' => 5, 'orderby' => $random, 'meta_query' => array(array('key' => 'javo_this_featured_item', 'compare' => '=', 'value' => 'use'))); $javo_this_results = array(); $javo_this_results_key = 0; $javo_this_items = new WP_Query($javo_this_items_args); if ($javo_this_items->have_posts()) { while ($javo_this_items->have_posts()) { $javo_this_items->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_iamge_id = get_post_thumbnail_id(); $javo_this_results[$javo_this_results_key]['image'] = (int) $javo_this_iamge_id > 0 ? wp_get_attachment_image($javo_this_iamge_id, 'javo-large') : sprintf('<img src="%s" height="400" style="width:100%%;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); $javo_this_results[$javo_this_results_key]['title'] = get_the_title(); $javo_this_results[$javo_this_results_key]['meta'] = sprintf('%s / %s ', $javo_meta_query->cat('item_location', __('No location', 'javo_fr')), $javo_meta_query->cat('item_category', __('No Category', 'javo_fr'))); $javo_this_results[$javo_this_results_key]['permalink'] = get_permalink(); $javo_this_results_key++; } // End While } // End If ob_start(); ?> <?php echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div id="javo-featured-items-wrap" class="row"> <div class="col-md-6 left-big-img"> <?php if (!empty($javo_this_results[0])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[0]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[0]['title']; ?> </div> <?php echo $javo_this_results[0]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[0]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[0]['meta']; ?> </div> </div><!-- /.item-captions --> </div><!-- /.item-cover-inner --> </div><!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div><!-- /.col-md-6 --> <div class="col-md-6 right-small-img"> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[1])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[1]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[1]['title']; ?> </div> <?php echo $javo_this_results[1]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[1]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[1]['meta']; ?> </div> </div><!-- /.item-captions --> </div><!-- /.item-cover-inner --> </div><!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div><!-- /.col-md-6 --> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[2])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[2]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[2]['title']; ?> </div> <?php echo $javo_this_results[2]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[2]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[2]['meta']; ?> </div> </div><!-- /.item-captions --> </div><!-- /.item-cover-inner --> </div><!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div><!-- /.col-md-6 --> </div><!-- /.row --> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[3])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[3]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[3]['title']; ?> </div> <?php echo $javo_this_results[3]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[3]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[3]['meta']; ?> </div> </div><!-- /.item-captions --> </div><!-- /.item-cover-inner --> </div><!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div><!-- /.col-md-6 --> <div class="col-md-6 col-sm-6 col-xs-6"> <?php if (!empty($javo_this_results[4])) { ?> <div class="item-container"> <a href="<?php echo $javo_this_results[4]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[4]['title']; ?> </div> <?php echo $javo_this_results[4]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[4]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[4]['meta']; ?> </div> </div><!-- /.item-captions --> </div><!-- /.item-cover-inner --> </div><!-- /.item-cover --> </a> </div><!-- /.item-container --> <?php } ?> </div><!-- /.col-md-6 --> </div><!-- /.row --> </div><!-- /.col-md-6 --> </div><!-- /#javo-featured-items-wrap --> <?php wp_reset_query(); $content = ob_get_clean(); return $content; }
<?php /** * The template for displaying posts in the Status post format * * @package WordPress * @subpackage Javo_Directory * @since Javo Themes 1.0 */ global $javo_tso, $javo_custom_item_tab, $javo_custom_item_label, $javo_favorite; $javo_meta_query = new javo_GET_META(get_the_ID()); $detail_images = @unserialize($javo_meta_query->_get('detail_images', null)); ?> <!-- #### <div class="row"> in Arichive File --> <div class="col-md-12"> <div id="post-<?php the_ID(); ?> " <?php post_class('archive-classic-style-wrap'); ?> > <div class="row"> <div class="col-md-12 javo-archive-list"> <div class="media"> <div class="pull-left archive-thumb"> <a href="<?php the_permalink();
function rating_list_function($atts, $content = '') { global $javo_tso; wp_enqueue_style('javo-rating-list-css', JAVO_THEME_DIR . '/library/shortcodes/rating-list/javo-rating-list.css', '1.0'); extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'count' => 5), $atts)); $javo_this_ratings_args = array('post_type' => 'item', 'post_status' => 'publish', 'posts_per_page' => $count, 'orderby' => 'meta_value', 'meta_key' => 'rating_average'); ob_start(); echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div class="javo-rating-list-wrap"> <?php $javo_this_ratings = new WP_Query($javo_this_ratings_args); if ($javo_this_ratings->have_posts()) { $i = 1; while ($javo_this_ratings->have_posts()) { $javo_this_ratings->the_post(); $javo_this_score = (double) get_post_meta(get_the_ID(), 'rating_average', true); $javo_meta_query = new javo_GET_META(get_the_ID()); $rating_raniking_num = $i++; ?> <div class="row rating_list top-ranker"> <div class="col-md-3 top-ratings-thumb"> <a href="<?php the_permalink(); ?> .#item-ratings"> <?php if (has_post_thumbnail()) { the_post_thumbnail('thumbnail'); } else { printf('<img src="%s" class="img-responsive wp-post-image img-circle" style="width:80px; height:80px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> </a> <div class="top-ratings-num rating-num-<?php echo $rating_raniking_num; ?> "><?php echo $rating_raniking_num; ?> </div> </div> <div class="col-md-6 javo-p-t-20px"> <a href="<?php the_permalink(); ?> .#item-ratings"> <h3><?php echo javo_str_cut(get_the_title(), 20); ?> </h3> <p><?php printf('%s / %s', $javo_meta_query->cat('item_category', __('No category', 'javo_fr')), $javo_meta_query->cat('item_location', 'No Location')); ?> </p> </a> </div> <div class="col-md-2 javo-p-t-20px"> <div class="text-center"> <?php printf('<span class="rating_ave">%s</span> / <span class="rating_amount">%s</span>', $javo_this_score, $javo_meta_query->get_child_count('ratings', 'rating_parent_post_id')); ?> </div> <div class="javo-rating-registed-score" data-score="<?php echo $javo_this_score; ?> " title=<?php _e("gorgeous", "javo_fr"); ?> ></div> </div><!-- Col --> </div><!-- rating_list-imgs --> <?php } // End While } else { _e('Not Items Found.', 'javo_fr'); } // End If ?> </div> <?php wp_reset_query(); $content = ob_get_clean(); return $content; }
public static function javo_events_gallery_function($atts = array(), $content = "") { global $javo_tso; self::$load_script = true; extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'display_type' => 'parent'), $atts)); $javo_this_gallery_args = array("post_type" => 'jv_events', "post_status" => 'publish', "posts_per_page" => -1); $javo_this_get_term_args = array(); $javo_this_get_term_args['hide_empty'] = false; if ($display_type == 'parent' || $display_type == '') { $javo_this_get_term_args['parent'] = 0; } $javo_events_gallery_posts = new WP_Query($javo_this_gallery_args); $javo_events_gallery_terms = get_terms("jv_events_category", $javo_this_get_term_args); ob_start(); echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div id="javo-events-gall"> <div class="javo-events-gallery-navi"> <button class="javo-event-gallery-filter" data-filter="all"><?php _e('ALL', 'javo_fr'); ?> </button> <?php foreach ($javo_events_gallery_terms as $term) { printf('<button class="javo-event-gallery-filter gallery-terms-btn" data-filter=".javo-events-gallery-term-%s">%s</button>', $term->term_id, strtoupper($term->name)); } ?> </div> <div class="javo-events-gallery row"> <?php if ($javo_events_gallery_posts->have_posts()) { while ($javo_events_gallery_posts->have_posts()) { $javo_events_gallery_posts->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_parent_permalink = apply_filters('javo_wpml_link', get_post_meta(get_the_ID(), 'parent_post_id', true)); $javo_this_parent_permalink .= "#item-events"; $javo_this_include_terms = $javo_meta_query->cat('jv_events_category', false, false, true); $javo_this_terms = ''; if ($javo_this_include_terms != false) { foreach ($javo_this_include_terms as $terms) { $javo_this_terms .= ' javo-events-gallery-term-' . $terms->term_id; } } else { $javo_this_terms = ' javo-events-gallery-term-all'; } ?> <div class="col-md-3 javo-event-gallery-mix<?php echo $javo_this_terms; ?> "> <a href="<?php echo $javo_this_parent_permalink; ?> "> <?php if (has_post_thumbnail()) { echo get_the_post_thumbnail(get_the_ID(), 'javo-box'); } else { printf('<img src="%s" class="jv-events-gallery-no-image" style="width:100%%; height:266px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png')); } ?> </a> <div class="javo-events-gallery-term-content-title"><span><?php echo javo_str_cut(get_the_title(), 25); ?> </span></div> <?php if (get_post_meta(get_the_ID(), 'brand', true)) { ?> <div class="event-tag custom-bg-color-setting admin-color-setting"> <?php echo apply_filters('javo_offer_brand_tag', get_post_meta(get_the_ID(), 'brand', true)); ?> </div> <?php } ?> </div> <?php } // End While } else { _e('No Items Found.', 'javo_fr'); } // End If wp_reset_query(); ?> <div class="gap"></div> <div class="gap"></div> </div> </div> <script type="text/javascript"> jQuery(function($){ "use strict"; $('.javo-events-gallery').mixItUp({ selectors:{ target : '.javo-event-gallery-mix' , filter : '.javo-event-gallery-filter' } }); }); </script> <?php return ob_get_clean(); }
public function javo_featured_items_callback($atts, $content = "") { extract(shortcode_atts(array('title' => '', 'sub_title' => '', 'title_text_color' => '#000', 'sub_title_text_color' => '#000', 'line_color' => '#fff', 'random' => ''), $atts)); $javo_this_items_args = array('post_type' => 'item', 'post_status' => 'publish', 'posts_per_page' => 5, 'orderby' => rand, 'meta_query' => array(array('key' => 'javo_this_featured_item', 'compare' => '=', 'value' => 'use'))); $javo_this_results = array(); $javo_this_results_key = 0; $javo_this_items = new WP_Query($javo_this_items_args); if ($javo_this_items->have_posts()) { while ($javo_this_items->have_posts()) { $javo_this_items->the_post(); $javo_meta_query = new javo_GET_META(get_the_ID()); $javo_this_iamge_id = get_post_thumbnail_id(); $javo_this_results[$javo_this_results_key]['image'] = wp_get_attachment_image($javo_this_iamge_id, 'javo-large'); $javo_this_results[$javo_this_results_key]['title'] = get_the_title(); $javo_this_results[$javo_this_results_key]['meta'] = sprintf('%s / %s ', $javo_meta_query->cat('item_location', __('No location', 'javo_fr')), $javo_meta_query->cat('item_category', __('No Category', 'javo_fr'))); $javo_this_results[$javo_this_results_key]['permalink'] = get_permalink(); $javo_this_results_key++; } // End While } // End If ob_start(); ?> <?php echo apply_filters('javo_shortcode_title', $title, $sub_title, array('title' => 'color:' . $title_text_color . ';', 'subtitle' => 'color:' . $sub_title_text_color . ';', 'line' => 'border-color:' . $line_color . ';')); ?> <div id="javo-featured-items-wrap" class="carousel slide" data-ride="carousel"> <h4 class="text-uppercase"> Featured Venues </h4> <div class="carousel-inner" role="listbox"> <?php if (!empty($javo_this_results[0])) { ?> <div class="item active row"> <div class="col-sm-12"> <div class="item-container"> <a href="<?php echo $javo_this_results[0]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[0]['title']; ?> </div> <?php echo $javo_this_results[0]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[0]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[0]['meta']; ?> </div> </div> </div> </div> </a> </div> </div> </div> <?php } ?> <?php if (!empty($javo_this_results[1])) { ?> <div class="item row"> <div class="col-sm-12"> <div class="item-container"> <a href="<?php echo $javo_this_results[1]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[1]['title']; ?> </div> <?php echo $javo_this_results[1]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[1]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[1]['meta']; ?> </div> </div> </div> </div> </a> </div> </div> </div> <?php } ?> <?php if (!empty($javo_this_results[2])) { ?> <div class="item row"> <div class="col-sm-12"> <div class="item-container"> <a href="<?php echo $javo_this_results[2]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[2]['title']; ?> </div> <?php echo $javo_this_results[2]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[2]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[2]['meta']; ?> </div> </div> </div> </div> </a> </div> </div> </div> <?php } ?> <?php if (!empty($javo_this_results[3])) { ?> <div class="item row"> <div class="col-sm-12"> <div class="item-container"> <a href="<?php echo $javo_this_results[3]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[3]['title']; ?> </div> <?php echo $javo_this_results[3]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[3]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[3]['meta']; ?> </div> </div> </div> </div> </a> </div> </div> </div> <?php } ?> <?php if (!empty($javo_this_results[4])) { ?> <div class="item row"> <div class="col-sm-12"> <div class="item-container"> <a href="<?php echo $javo_this_results[4]['permalink']; ?> "> <div class="feature-item-bottom-title"><?php echo $javo_this_results[4]['title']; ?> </div> <?php echo $javo_this_results[4]['image']; ?> <div class="item-cover"> <div class="item-cover-inner"> <div class="item-captions"> <div class="item-title"><?php echo $javo_this_results[4]['title']; ?> </div> <div class="item-description"><?php echo $javo_this_results[4]['meta']; ?> </div> </div> </div> </div> </a> </div> </div> </div> <?php } ?> </div> </div> <?php wp_reset_query(); $content = ob_get_clean(); return $content; }