function widget($atts, $instance)
 {
     extract($atts, EXTR_SKIP);
     echo $before_widget;
     $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
     $number_of_posts = empty($instance['number_of_posts']) ? '' : $instance['number_of_posts'];
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     echo '<ul>';
     query_posts('showposts=' . $number_of_posts . '&orderby=comment_count');
     while (have_posts()) {
         the_post();
         $post_id = get_the_ID();
         $post_format = get_post_format($post_id);
         echo '<li>';
         echo '<dl class="dl-horizontal">';
         if (has_post_thumbnail()) {
             echo '<dt><img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')) . '" alt=""></dt>';
         }
         echo '<dd>';
         echo '<a href="' . esc_url(get_permalink()) . '">' . esc_html(get_the_title()) . '</a>';
         echo '<span class="date">' . get_the_date() . '</span>';
         echo '</dd>';
         echo '</dl>';
         echo '</li>';
     }
     echo '</ul>';
     echo $after_widget;
 }
Example #2
0
    ?>
            <a class="next" href="<?php 
    echo get_permalink(get_next_post()->ID);
    ?>
">
                <span class="icon-wrap"><i class="icon-angle-right"></i></span>
                <div>
                    <h3><?php 
    echo esc_html(get_next_post()->post_title);
    ?>
</h3>
                    <?php 
    if (has_post_thumbnail(get_next_post()->ID)) {
        ?>
                    <img src="<?php 
        echo esc_url(codeless_image_by_id(get_post_thumbnail_id(get_next_post()->ID), 'blog_grid', 'url'));
        ?>
" alt="Next thumb"/>
                    <?php 
    }
    ?>
                </div>
            </a>
            <?php 
}
?>
 
        </div>

<?php 
get_footer();
do_action('codeless_excecute_query_var_action', 'loop-single_portfolio_bottom');
?>

<div class="container">
    <div class="gallery row">
        <?php 
if (!empty($cl_redata['single_portfolio_gallery'])) {
    foreach ($cl_redata['single_portfolio_gallery'] as $slide) {
        ?>
        <a class="lightbox-gallery" href="<?php 
        echo esc_url($slide['image']);
        ?>
" title="">
            <div class="visual lightbox">
                <img src="<?php 
        echo esc_url(codeless_image_by_id($slide['attachment_id'], 'port3', 'url'));
        ?>
" alt="">
                <span class="moon-zoom"></span>
            </div>
        </a>
        <?php 
    }
    ?>
        <?php 
}
?>
    </div>
    <div class="row-fluid content">
        <div class="span9">
            <h4><?php 
 $tags = get_the_tags();
 $tag_out = '';
 $num = count($tags);
 $i = 0;
 if ($tags) {
     foreach ($tags as $tag) {
         if (++$i === $num) {
             $tag_out .= $tag->name;
         } else {
             $tag_out .= $tag->name . ', ';
         }
     }
 }
 $output .= '<div class="' . ($carousel == 'yes' ? 'swioer-slide' : '') . ' blog-item ' . esc_attr($style) . ' ' . ($dynamic_from_where == 'one_post' ? 'single' : '') . '">';
 if (has_post_thumbnail()) {
     $output .= '<img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2', 'url')) . '" alt="">';
 }
 $output .= '<div class="content">';
 $output .= '<h4><a href="' . esc_attr(get_permalink()) . '">' . esc_html(get_the_title()) . '</a></h4>';
 $output .= '<ul class="info">';
 $output .= '<li><i class="linecon-icon-user"></i>' . __('Posted by', 'codeless') . ' ' . get_the_author() . '</li>';
 $output .= '<li><i class="linecon-icon-calendar"></i>' . __('On', 'codeless') . ' ' . get_the_date() . '</li>';
 $output .= '</ul>';
 $output .= '<p>' . codeless_text_limit(get_the_excerpt(), $text_limit) . '</p>';
 $output .= '<div class="after">';
 $output .= '<ul class="info">';
 $output .= '<li><i class="linecon-icon-tag"></i>' . $tag_out . '</li>';
 $output .= '</ul>';
 $output .= '<div class="post-like">' . getPostLikeLink(get_the_ID()) . '</div>';
 $output .= '</div>';
 $output .= '</div>';
        }
        $font_color = $cl_redata['page_header_menu_color'] == 'auto' ? '' : 'background--' . $cl_redata['page_header_menu_color'];
        ?>

        
        <?php 
        if (has_post_thumbnail()) {
            ?>
        <article id="post-<?php 
            echo the_ID();
            ?>
" <?php 
            echo post_class('fullscreen-blog-article section');
            ?>
 style="background-image:url('<?php 
            echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), '', 'url'));
            ?>
');">     
            
                
            <div class="content <?php 
            echo esc_attr($cl_redata['fullscreen_post_position']);
            ?>
 with_animation animated <?php 
            echo esc_attr($font_color);
            ?>
" data-animation="<?php 
            echo esc_attr($cl_redata['fullscreen_post_effect']);
            ?>
" data-delay="<?php 
            echo esc_attr($cl_redata['fullscreen_post_delay']);
/**
 * Shortcode attributes
 * @var $atts
 * @var $testimon
 * Shortcode class
 * @var  WPBakeryShortCode_Single_Testionial
 */
$output = '';
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
$output = '';
$output = '<div class="wpb_content_element">';
if (!isset($testimon)) {
    $testimon = 0;
}
$query_post = array('posts_per_page' => 9999, 'post_type' => 'testimonial', 'p' => $testimon);
$loop = new WP_Query($query_post);
if ($loop->have_posts()) {
    while ($loop->have_posts()) {
        $loop->the_post();
        $output .= '<div class="single_testimonial"><dl class="dl-horizontal"><dt><img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'thumbnail', 'url')) . '" alt=""></dt><dd>';
        $output .= '<p>' . get_the_content() . '</p>';
        $output .= '<div class="param">';
        $output .= '<h6>' . esc_html(get_the_title()) . ', </h6><span class="position"> ' . esc_attr($cl_redata['staff_position']) . '</span>';
        $output .= '</div>';
        $output .= '</dd></dl></div>';
    }
}
wp_reset_query();
$output .= '</div>';
echo $output;
 function codeless_news()
 {
     $output = '<div class="codeless_news_slider">';
     $output .= '<div class="codeless_slider_swiper">';
     $output .= '<div class="codeless_slider_wrapper">';
     $output .= '<div class="codeless-slider-container swiper-parent swiper_slider codeless_slider"  data-slidenumber="1">';
     $output .= '<div class="pagination-parent nav-simple nav-slider">
                                     <a class="prev" href="">
                                         <span class="icon-wrap"><i class="icon-angle-left"></i></span>
                                         <div class="text">' . __('PREV', 'codeless') . '</div>
                                     </a>
                                     <a class="next" href="">
                                         <span class="icon-wrap"><i class="icon-angle-right"></i></span>
                                         <div class="text">' . __('NEXT', 'codeless') . '</div>
                                     </a>
                                 </div>';
     $output .= '<div class="swiper-wrapper">';
     query_posts(array('post__not_in' => array($this->options['featured_1'], $this->options['featured_2']), 'orderby' => 'date', 'posts_per_page' => 5));
     if (have_posts()) {
         while (have_posts()) {
             the_post();
             $output .= '<div class="swiper-slide" style="background-image:url(' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), '', 'url')) . ');">';
             $output .= '<div class="overlay"></div>';
             $output .= '<h1 class="animated with_animation" data-animation="fadeInUp"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h1>';
             $output .= '<p>' . codeless_text_limit(get_the_content(), 16) . '</p>';
             $output .= '</div>';
         }
     }
     wp_reset_query();
     $output .= '</div>';
     $output .= '</div>';
     $output .= '</div>';
     $output .= '</div>';
     $output .= '<div class="featured_posts">';
     query_posts(array('post__in' => array($this->options['featured_1'], $this->options['featured_2'])));
     if (have_posts()) {
         while (have_posts()) {
             the_post();
             $id = get_the_ID();
             $output .= '<div class="featured" style="background-image:url(' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'staff', 'url')) . ');">';
             $output .= '<div class="overlay"></div>';
             $output .= '<h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
             $output .= '<p>' . codeless_text_limit(get_the_content(), 12) . '</p>';
             $output .= '</div>';
         }
     }
     wp_reset_query();
     $output .= '</div>';
     $output .= '</div>';
     return $output;
 }
                <div class="media">
                    <!-- <div class="post_type"><i class="moon-<?php 
        echo $icon_class;
        ?>
"></i></div> -->
                    <?php 
        if ($post_format == 'audio') {
            echo do_shortcode('[soundcloud]' . get_the_excerpt() . '[/soundcloud]');
        } elseif (get_post_thumbnail_id()) {
            ?>
                        <a href="<?php 
            echo esc_url(get_permalink());
            ?>
"><div class="overlay"><div class="post_type_circle"><i class="icon-chevron-right"></i></div></div></a>
                        <img src="<?php 
            echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), $attach_size, 'url'));
            ?>
" alt="">
                                                        
                    <?php 
        } elseif ($post_format == 'gallery') {
            $slider = new codeless_slideshow(get_the_ID(), 'flexslider');
            if ($slider && $slider->slide_number > 0) {
                $slider->img_size = $attach_size;
                $sliderHtml = $slider->render_slideshow();
                echo $sliderHtml;
            }
        } elseif ($post_format == 'video') {
            $video = "";
            $link = $cl_redata['media_post_link'];
            if (codeless_backend_is_file($link, 'html5video')) {
                $output .= '<img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog', 'url')) . '" alt="">';
                $output .= '<ul class="info">';
                $output .= '<li><i class="linecon-icon-user"></i>' . __('Posted by', 'codeless') . ' ' . esc_html(get_the_author()) . '</li>';
                $output .= '<li><i class="linecon-icon-calendar"></i>' . __('On', 'codeless') . ' ' . esc_html(get_the_date()) . '</li>';
                $output .= '</ul>';
                $output .= '<a href="' . esc_url(get_permalink()) . '"></a></div>';
            }
        } else {
            if ($style == 'events') {
                $output .= '<dl class="blog-item dl-horizontal">';
                $output .= '<a href="' . esc_url(get_permalink()) . '"></a>';
                $dt = get_the_time('j') . ' ' . get_the_time('M');
                if (!empty($cl_redata['future_date_events'])) {
                    $dt = $cl_redata['future_date_events'];
                }
                $output .= '<dt><span class="date">' . $dt . '</span></dt>';
                $output .= '<dd><h5>' . esc_html(get_the_title()) . '</h5><span class="time">' . get_the_time('h:i a') . '</span><a class="link" href="' . esc_url(get_permalink()) . '"><i class="moon-arrow-right-5"></i></a></dd>';
                $output .= '</dl>';
            } else {
                if ($style == 'vertical') {
                    $output .= '<dl class="blog-item dl-horizontal">';
                    $output .= '<dt><img src="' . esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')) . '" alt=""></dt>';
                    $output .= '<dd><h5><a href="' . esc_url(get_permalink()) . '">' . esc_attr(get_the_title()) . '</a></h5><span class="date">' . get_the_time('j M h:i a') . '</span><p>' . codeless_text_limit(get_the_excerpt(), 18) . '</p></dd>';
                    $output .= '</dl>';
                }
            }
        }
    }
}
$output .= '</div>';
echo $output;
    $query_post = array('posts_per_page' => 9999, 'post_type' => 'staff');
} else {
    $query_post = array('posts_per_page' => 9999, 'post_type' => 'staff', 'tax_query' => array(array('taxonomy' => 'staff_entries', 'field' => 'id', 'terms' => (int) $test_cat, 'operator' => 'IN')));
}
$additional_loop = new WP_Query($query_post);
$output .= '<div class="wpb_content_element staff_carousel">';
$output .= '<div class="codeless-slider-container swiper-parent swiper_slider staff_slider"  data-slidenr="' . esc_attr($slide_per_view) . '">';
if ($pagination == 'yes') {
    $output .= '<div class="swiper_pagination pagination-parent nav-fillpath"><a href="#" class="prev"><span class="icon-wrap"></span></a><a href="#" class="next"><span class="icon-wrap"></span></a></div>';
}
$output .= '<div class="swiper-wrapper">';
if ($additional_loop->have_posts()) {
    while ($additional_loop->have_posts()) {
        $additional_loop->the_post();
        $content = get_the_content();
        $featured = esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'staff_full', 'url'));
        $position = $cl_redata['staff_position'];
        $ext_style = '';
        $output .= '<div class="swiper-slide " style=" ' . $ext_style . '" >';
        $output .= '<div class="single_staff modern">';
        $output .= '<div class="he-wrap tpl2">';
        $output .= '<div class="featured_img">';
        $output .= '<img src="' . esc_url($featured) . '" alt="">';
        $output .= '<div class="overlay he-view">';
        $output .= '<div class="bg a0" data-animate="fadeIn">';
        $output .= '<div class="center-bar">';
        if ($cl_redata['facebook_link'] != '') {
            $output .= '<a href="' . esc_url($cl_redata['facebook_link']) . '" class="a1" data-animate="fadeInUp" title="Facebook"><i class="moon-facebook"></i></a>';
        }
        if ($cl_redata['twitter_link'] != '') {
            $output .= '<a href="' . esc_url($cl_redata['twitter_link']) . '" class="a1" data-animate="fadeInUp" title="Twitter"><i class="moon-twitter"></i></a>';
if ($dynamic_content_type == 'content') {
    $data['description'] = $content;
    $data['link'] = $dynamic_content_link;
} else {
    $loop = new WP_Query($query);
    if ($loop->have_posts()) {
        while ($loop->have_posts()) {
            $loop->the_post();
            $data['link'] = get_permalink();
            $data['description'] = get_the_excerpt();
        }
    }
    wp_reset_query();
}
if ($icon_bool == 'icon' || $icon_bool == 'yes' && !empty($icon)) {
    $extra_st = '';
    if ($style == 'style_1') {
        $extra_st = 'background:' . $circle_color . ';';
    }
    if ($style == 'style_3') {
        $extra_st = 'border:2px solid ' . esc_attr($border_color) . ';';
    }
    $output .= '<div class="icon_wrapper" style="' . $extra_st . '"><i class="' . esc_attr($icon) . '" style="color:' . esc_attr($icon_color) . ';"></i></div>';
}
if ($icon_bool == 'image' && !empty($image)) {
    $output .= '<img src="' . esc_url(codeless_image_by_id($image, '', 'url')) . '" alt="" />';
}
$output .= '<h4><a href="' . esc_url($data['link']) . '">' . esc_html($title) . '</a></h4>';
$output .= '<p>' . do_shortcode($data['description']) . '</p>';
$output .= '</div>';
echo $output;
Example #12
0
 */
global $cl_redata;
$output = '';
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
global $cl_redata;
$output = '';
if (isset($staff)) {
    $output .= '<div class="wpb_content_element">';
    $query_post = array('p' => $staff, 'posts_per_page' => 1, 'post_type' => 'staff');
    $additional_loop = new WP_Query($query_post);
    if ($additional_loop->have_posts()) {
        while ($additional_loop->have_posts()) {
            $additional_loop->the_post();
            $content = get_the_content();
            $featured = codeless_image_by_id(get_post_thumbnail_id(), 'staff', 'url');
            $position = $cl_redata['staff_position'];
            $output .= '<div class="single_staff ' . esc_attr($style) . '">';
            $output .= '<div class="he-wrap tpl2">';
            $output .= '<div class="featured_img">';
            $output .= '<img src="' . esc_url($featured) . '" alt="">';
            if ($style == 'style_1') {
                $output .= '<div class="overlay he-view">';
                $output .= '<div class="bg a0" data-animate="fadeIn">';
                $output .= '<div class="center-bar">';
                if ($cl_redata['facebook_link'] != '') {
                    $output .= '<a href="' . esc_url($cl_redata['facebook_link']) . '" class="a1" data-animate="fadeInUp" title="Facebook"><i class="moon-facebook"></i></a>';
                }
                if ($cl_redata['twitter_link'] != '') {
                    $output .= '<a href="' . esc_url($cl_redata['twitter_link']) . '" class="a1" data-animate="fadeInUp" title="Twitter"><i class="moon-twitter"></i></a>';
                }