Ejemplo n.º 1
0
</div>-->
    <?php 
echo STFeatured::get_featured();
?>
    <div class="thumb item_map">
        <header class="thumb-header">
            <div class="booking-item-img-wrap st-popup-gallery">
                <a href="<?php 
echo esc_url($thumb_url);
?>
" class="st-gp-item">
                     <?php 
if (has_post_thumbnail() and get_the_post_thumbnail()) {
    the_post_thumbnail(array(360, 270, 'bfi_thumb' => TRUE));
} else {
    echo st_get_default_image();
}
?>
                </a>
                <?php 
$count = 0;
$gallery = get_post_meta(get_the_ID(), 'gallery', TRUE);
$gallery = explode(',', $gallery);
if (!empty($gallery) and $gallery[0]) {
    $count += count($gallery);
}
if (has_post_thumbnail()) {
    $count++;
}
if ($count) {
    echo '<div class="booking-item-img-num"><i class="fa fa-picture-o"></i>';
Ejemplo n.º 2
0
    $title = ucfirst($instance['style']);
    $title .= " " . STLocation::get_post_type_name($instance['post_type']);
    $title .= " " . __("in", ST_TEXTDOMAIN);
    $title .= " <strong>" . ucfirst(get_the_title($instance['location'])) . "</strong>";
} else {
    $title = $instance['title'];
}
echo "<h4> " . $title . " </h4>";
echo "<ul class='booking-list'>";
if (!empty($results) and is_array($results)) {
    foreach ($results as $key => $value) {
        $link = get_permalink($value->ID);
        $post_id = $value->ID;
        $thumbnail = get_the_post_thumbnail($post_id, 'full');
        if (!$thumbnail) {
            $thumbnail = st_get_default_image();
        }
        if (isset($instance['layout']) && !empty($instance['layout'])) {
            $layout = $instance['layout'];
        } else {
            $layout = 'layout1';
        }
        ?>
		<li class='widget_location '>
			<div class="bookinst_save_attributeg-item booking-item booking-item-small">
                <div class="row">
                    <div class="<?php 
        if ($layout == 'layout2') {
            echo 'col-xs-12';
        } else {
            echo 'col-xs-4';