} 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>'; $output .= '</div>'; } } } if ($carousel == 'yes') { $output .= '</div>'; $output .= '</div>'; } else {
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; }
} ?> <?php } ?> </ul> <div class="text"> <?php if (is_single()) { the_content(); } else { if ($post_format == 'video' || $post_format == 'audio') { echo codeless_text_limit(get_the_content(), 60); } else { echo get_the_excerpt(); } } ?> </div> <?php if (!is_single()) { ?> <a href="<?php echo get_permalink(); ?> " class="btn-bt <?php echo esc_attr($cl_redata['overall_button_style'][0]); ?>
$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;