예제 #1
0
    function shandora_get_footer_widget()
    {
        ?>
		<div class="footer-widgets footer-inner">

			<div class="row">

				<?php 
        for ($i = 1; $i <= 4; $i++) {
            ?>

					<div id="footer-widget-<?php 
            echo $i;
            ?>
" class="<?php 
            echo shandora_column_class("large-3");
            ?>
">
						
					<?php 
            if (is_active_sidebar('footer' . $i)) {
                ?>

						<?php 
                dynamic_sidebar('footer' . $i);
                ?>

					<?php 
            } else {
                ?>

						<!-- This content shows up if there are no widgets defined in the backend. -->
						
						<p><?php 
                _e("Please activate some Widgets.", "framework");
                ?>
</p>

					<?php 
            }
            ?>

					</div>

				<?php 
        }
        ?>

			</div>

		</div>

		<?php 
    }
예제 #2
0
function shandora_column_shortcode($attr, $content = null)
{
    $attr = shortcode_atts(array('class' => '', 'id' => '', 'size' => 'large-12'), $attr);
    return '<div class="' . shandora_column_class($attr['size']) . $attr['class'] . '">' . do_shortcode($content) . '</div>';
}
예제 #3
0
        ?>
 
		<h4 class="bon-form-title"><?php 
        _e('Favorite Cars', 'bon');
        ?>
</h4>
		<?php 
        $loop2 = array('post_type' => 'car-listing', 'post__in' => $car_post_ids, 'posts_per_page' => -1);
        query_posts($loop2);
        if (have_posts()) {
            ?>

			<div id="listings-container" class="row">

				<div class="<?php 
            echo shandora_column_class('large-12');
            ?>
">

					<ul class="listings <?php 
            echo $ul_class;
            ?>
" data-compareurl="<?php 
            echo get_permalink($compare_page);
            ?>
">

				<?php 
            while (have_posts()) {
                the_post();
                $status = shandora_get_meta(get_the_ID(), 'listing_status');
function shandora_render_builder_element_car_listing($value)
{
    $layout = get_theme_mod('theme_layout');
    if (empty($layout)) {
        $layout = get_post_layout(get_queried_object_id());
    }
    extract($value);
    $o = '';
    $car_ids = array();
    if ($body_type == 'all' || !empty($car_id)) {
        $body_type = '';
    }
    if ($dealer_location == 'all' || !empty($car_id)) {
        $dealer_location = '';
    }
    if ($car_feature == 'all' || !empty($car_id)) {
        $car_feature = '';
    }
    if ($manufacturer == 'all' || !empty($car_id)) {
        $manufacturer = '';
    }
    $meta_car_query = array();
    if (!empty($car_id)) {
        $car_ids = explode(',', $car_id);
    } else {
        if (isset($car_query) && $car_query != ' latest') {
            switch ($car_query) {
                case 'featured':
                    $meta_car_query = array('key' => bon_get_prefix() . 'listing_featured', 'value' => true, 'compare' => '=');
                    break;
                case 'new':
                    $meta_car_query = array('key' => bon_get_prefix() . 'listing_status', 'value' => 'new', 'compare' => '=');
                    break;
                case 'used':
                    $meta_car_query = array('key' => bon_get_prefix() . 'listing_status', 'value' => 'used', 'compare' => '=');
                    break;
                case 'certified':
                    $meta_car_query = array('key' => bon_get_prefix() . 'listing_status', 'value' => 'certified', 'compare' => '=');
                    break;
            }
        }
    }
    $car_loop = array('post_type' => 'car-listing', 'post__in' => $car_ids, 'posts_per_page' => $numberposts, 'body-type' => $body_type, 'dealer-location' => $dealer_location, 'car-feature' => $car_feature, 'manufacturer' => $manufacturer, 'meta_query' => array($meta_car_query));
    $mobile = bon_get_option('mobile_layout', '2');
    $block_cls = '4';
    if ($layout == '2c-l' || $layout == '2c-r') {
        $block_cls = '3';
    }
    $ul_class = "small-block-grid-" . $mobile . " large-block-grid-" . $block_cls;
    $compare_page = bon_get_option('compare_page');
    query_posts($car_loop);
    if (have_posts()) {
        $o .= '<div id="listings-container" class="row">';
        $o .= '<div class="' . shandora_column_class('large-12', false) . '">';
        $o .= '<ul class="listings ' . $ul_class . '" data-compareurl="' . get_permalink($compare_page) . '">';
        while (have_posts()) {
            the_post();
            $suffix = 'listing_';
            $badge = shandora_get_meta(get_the_ID(), $suffix . 'badge');
            $badgeclr = shandora_get_meta(get_the_ID(), $suffix . 'badge_color');
            $o .= '<li>';
            $o .= '<article id="post-' . get_the_ID() . '" class="' . join(' ', get_post_class($badgeclr, null, false)) . '" itemscope itemtype="http://schema.org/RealEstateAgent">';
            ob_start();
            bon_get_template_part('block', 'listing-header');
            $o .= ob_get_clean();
            $o .= '<div class="entry-summary">';
            ob_start();
            do_atomic('entry_summary');
            $o .= ob_get_clean();
            $o .= '</div>';
            ob_start();
            bon_get_template_part('block', 'listing-footer');
            $o .= ob_get_clean();
            $o .= '</article></li>';
        }
        $o .= '</ul></div></div>';
    }
    wp_reset_query();
    return $o;
}