?> "><?php the_title(); ?> </a></h2> <span class="line"> </span> <div class="meta"> <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a> <?php echo get_mtc_rating_sys('span', ' ', ''); ?> </div> </div> <?php echo $carousel; ?> </li> <?php } wp_reset_query(); ?> </ul> <div class="clearfix"></div> <a class="prev" id="foo2_prev" href="#"><i class="icon-angle-left"></i></a>
function mtc_news_boxs_v3_block($args) { /* set data cate */ $data_cat = $args['block']; foreach ($data_cat as $key_cat => $cat) { if ($cat == 'none') { unset($data_cat[$key_cat]); } } if (!empty($data_cat)) { foreach ($data_cat as $key_cat => $cat_id) { ?> <h2 class="ribbon-v3"><span><?php echo get_cat_name($cat_id); ?> </span></h2> <section id="latest-3"> <div class="box-list-v3"> <?php $no = 1; $list_more = ''; global $post; query_posts(array('showposts' => 6, 'cat' => $cat_id, 'post_status' => 'publish')); while (have_posts()) { the_post(); if ($no == 1) { ?> <div class="list-v3-large news-50"> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('blog-thumb'); ?> <?php } else { ?> <img class="respon" src="<?php echo get_template_directory_uri() . '/img/default_thumbnail_large.jpg'; ?> " alt="<?php the_title(); ?> "> <?php } ?> <div class="overlay"></div> <div class="content-v3"> <h2><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <span class="line"> </span> <div class="panel-v"> <ul> <li><i class="icon-time"></i> <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time('M y'); ?> </a></li> <!--<li><?php the_author_posts_link(); ?> </li>--> <?php echo get_mtc_rating_sys('span', '<li>', '</li>'); ?> </ul> </div> </div> </div> <?php } else { $list_more .= '<article class="list-v3-small"> <div class="thumb-v3"><a href="' . get_permalink() . '" title="' . get_the_title() . '" > ' . get_the_post_thumbnail($post->ID, 'thumbnail') . ' </a></div> <h3><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3> <div class="panel-v"> <ul> <li><i class="icon-time"></i> <a href="' . get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')) . '">' . get_the_time(get_option('date_format')) . '</a></li> <!--<li><a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author_meta('display_name') . '</a></li>--> ' . get_mtc_rating_sys('span', ' <li> ', '</li>') . ' </ul> </div> </article>'; } $no++; } wp_reset_query(); ?> <div class="box-list-v3-small news-50"> <?php echo $list_more; ?> </div> <div class="clearfix"></div> </div> </section> <?php } } }
function mtc_rating_sys() { $vv = get_mtc_rating_sys(); echo $vv; }
?> "><?php the_title(); ?> </a></h2> <div class="panel-v"> <ul> <li><i class="icon-time"></i> <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a></li> <?php echo get_mtc_rating_sys('span', '<li>', '</li>'); ?> </ul> </div> </div> <div class="clearfix"></div> <p><?php echo excerpt(15); ?> </p> <div class="clearfix"></div> </article> <?php } $num_box++;
function mtc_news_tab() { global $smof_data; if ($smof_data['switch_news_tab']) { /* set data cate */ $data_cat = array($smof_data['news_tab_cat1'], $smof_data['news_tab_cat2'], $smof_data['news_tab_cat3'], $smof_data['news_tab_cat4'], $smof_data['news_tab_cat5'], $smof_data['news_tab_cat6'], $smof_data['news_tab_cat7'], $smof_data['news_tab_cat8']); foreach ($data_cat as $key_cat => $cat) { if ($cat == 'none') { unset($data_cat[$key_cat]); } } if (!empty($data_cat)) { ?> <!-- Tabs --> <div class="post_row"> <ul class="nav nav-tabs news_tabs mb0"> <?php $tab_nav = ''; $iterasi = 1; foreach ($data_cat as $cat) { $tab_nav .= '<li ' . ($iterasi == 1 ? 'class="active"' : '') . '><a data-toggle="tab" href="#tab-' . $cat . '">' . get_cat_name($cat) . '</a></li>'; $iterasi++; } echo $tab_nav; ?> </ul><!-- End Tab Nav --> <div class="tab-content news_tabs"> <?php $iterasi = 1; foreach ($data_cat as $cat) { echo '<div class="tab-pane' . ($iterasi == 1 ? ' active' : '') . '" id="tab-' . $cat . '">'; query_posts(array('showposts' => 4, 'cat' => $cat)); while (have_posts()) { the_post(); ?> <div class="tab_list"> <div class="tab_list_thumb"> <a href="<?php echo get_permalink(); ?> " title="<?php the_title(); ?> " > <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('blog-small'); ?> <?php } else { ?> <img src="<?php echo get_template_directory_uri() . '/img/default_thumbnail_large.jpg'; ?> " alt="<?php the_title(); ?> "> <?php } ?> </a> </div> <div class="tab_list_content"> <h2><a href="<?php echo get_permalink(); ?> "><?php the_title(); ?> </a></h2> <p><?php echo excerpt(22); ?> </p> <p class="panel"> <?php echo __('by', 'mtcframework'); ?> <?php the_author_posts_link(); ?> - <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a> <?php echo get_mtc_rating_sys('span', ' - ', ''); ?> </p> </div> </div><?php } /* Reset Query */ wp_reset_query(); echo '</div>'; $iterasi++; } ?> </div><!-- END Tabs Content--> </div><!-- END Tabs--><?php } } }
//comments_popup_link('0 Comments ', '1 Comment', '% Comments'); ?> <?php php; ?> <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a> <?php echo get_mtc_rating_sys('span', ' / ', ''); ?> </p> </div> <div class="spacer"></div> </div> <?php } else { ?> <?php global $post; ?> <div class="post_thumb"> <div class="mask"></div>
function mtc_scrolling_box_v3_grid($args) { ?> <div class="post_row"> <div class="post-pager" id="news-latest"></div> <h2 class="ribbon-v3"><span><?php echo $args['title']; ?> </span></h2> <div class="box-latest-2"> <section id="latest-2"> <?php $post_args = array('posts_per_page' => $args['per_page'], 'post_format' => 'post-format-video', 'orderby' => 'post_date', 'ignore_sticky_posts' => 1, 'order' => 'DESC'); wp_reset_query(); query_posts($post_args); while (have_posts()) { the_post(); ?> <article class="list-v2"> <?php if ('video' == get_post_format()) { $the_content = get_the_content('', true); $the_content = apply_filters('the_content', $the_content); $the_content = str_replace(']]>', ']]>', $the_content); $embed_code = rwmb_meta('mtc_embed_code', 'type=text'); if (function_exists('get_media_embedded_in_content')) { $media = get_media_embedded_in_content($the_content, 'iframe'); if (!empty($media)) { $pc = explode('</iframe>', $media[0]); $embed_code = $pc[0] . '</iframe>'; } } if (!empty($embed_code)) { echo $embed_code; } else { the_title(); } } else { ?> <div class="thumb-v2"> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('blog-thumb'); ?> <?php } else { ?> <img src="<?php echo get_template_directory_uri() . '/img/default_thumbnail_large.jpg'; ?> " alt="<?php the_title(); ?> "> <?php } ?> </div> <div class="overlay"></div> <div class="content-v2"> <h2><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <span class="line"> </span> <div class="panel-v"> <ul> <li><a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a></li> <li><?php the_author_posts_link(); ?> </li> <?php echo get_mtc_rating_sys('span', '<li>', '</li>'); ?> </ul> </div> </div> <?php } ?> </article> <?php } /* Reset Query */ wp_reset_query(); ?> </section> <div class="clearfix"></div> <a class="prev" id="latest-2_prev" href="#"><i class="icon-angle-left"></i></a> <a class="next" id="latest-2_next" href="#"><i class="icon-angle-right"></i></a> </div> </div> <?php }
function widget($args, $instance) { global $smof_data; // prints the widget extract($args, EXTR_SKIP); $title = esc_attr($instance['title']); $limit = !empty($instance['limit']) ? esc_attr($instance['limit']) : 4; $layout = !empty($instance['layout']) ? esc_attr($instance['layout']) : 'style1'; $content = !empty($instance['content']) ? esc_attr($instance['content']) : 'lates'; echo $before_widget; if (isset($title) && !empty($title)) { echo $before_title . $title . $after_title; } if ('popular' == $content) { $args = array('orderby' => 'comment_count', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $limit, 'ignore_sticky_posts' => 1); } elseif ('topreview' == $content) { $args = array('meta_key' => 'mtc_rating_average', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $limit, 'ignore_sticky_posts' => 1); } else { $args = array('orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $limit, 'ignore_sticky_posts' => 1); } if ('style1' == $layout) { ?> <div class="post-big-media style1"> <ul> <?php global $post; if ('popular' == $content) { add_filter('posts_where', 'filter_where'); } $my_query = null; $my_query = new WP_Query($args); if ($my_query->have_posts()) { while ($my_query->have_posts()) { $my_query->the_post(); ?> <li> <div class="overlay"></div> <div class="more-content"> <h2><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h2> <span class="line"> </span> <div class="meta"> <a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time(get_option('date_format')); ?> </a> <?php echo get_mtc_rating_sys('span', ' ', ' '); ?> </div> </div> <?php if (has_post_thumbnail()) { the_post_thumbnail('blog-small'); } else { ?> <img src="<?php echo get_template_directory_uri(); ?> /img/thumb_150.jpg" alt="image"/> <?php } ?> <div class="clearfix"></div> </li> <?php } ?> <?php } wp_reset_query(); if ('popular' == $content) { remove_filter('posts_where', 'filter_where'); } ?> </ul> </div> <?php } else { if ('style2' == $layout) { ?> <div class="media-2col style2"> <ul> <?php global $post; if ('popular' == $content) { add_filter('posts_where', 'filter_where'); } $my_query = null; $my_query = new WP_Query($args); if ($my_query->have_posts()) { while ($my_query->have_posts()) { $my_query->the_post(); ?> <li class="item"> <div class="post-imgthumb"> <a href="<?php echo get_permalink(); ?> " title="<?php the_title(); ?> " > <?php if (has_post_thumbnail()) { the_post_thumbnail('medium'); } else { ?> <img src="<?php echo get_template_directory_uri(); ?> /img/thumb_150.jpg" alt="image"/> <?php } ?> </a> </div> <div class="post-title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?> "><?php the_title(); ?> </a></div> <div class="panel-v"> <ul> <li><a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time('M y'); ?> </a></li> <li class="link-author"><?php the_author_posts_link(); ?> </li> <?php echo get_mtc_rating_sys('span', '<li>', '</li>'); ?> </ul> </div> <div class="clearfix"></div> </li> <?php } ?> <?php } wp_reset_query(); if ('popular' == $content) { remove_filter('posts_where', 'filter_where'); } ?> </ul><div class="clearfix"></div> </div> <?php } else { if ('style3' == $layout) { ?> <div class="post-widget style3"> <ul> <?php global $post; if ('popular' == $content) { add_filter('posts_where', 'filter_where'); } $my_query = null; $my_query = new WP_Query($args); if ($my_query->have_posts()) { while ($my_query->have_posts()) { $my_query->the_post(); ?> <li class="item"> <div class="post-imgthumb"> <a href="<?php echo get_permalink(); ?> " title="<?php the_title(); ?> " > <?php if (has_post_thumbnail()) { the_post_thumbnail('blog-small'); } else { ?> <img src="<?php echo get_template_directory_uri(); ?> /img/thumb_150.jpg" alt="image"/> <?php } ?> </a> </div> <div class="post-title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?> "><?php the_title(); ?> </a></div> <div class="panel-v"> <ul> <li><a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?> "><?php the_time('M y'); ?> </a></li> <li class="link-author"><?php the_author_posts_link(); ?> </li> <?php echo get_mtc_rating_sys('span', '<li>', '</li>'); ?> </ul> </div> <p><?php echo excerpt(15); ?> </p> <div class="clearfix"></div> </li> <?php } ?> <?php } wp_reset_query(); if ('popular' == $content) { remove_filter('posts_where', 'filter_where'); } ?> </ul><div class="clearfix"></div> </div> <?php } } } echo $after_widget; }