function wpex_post_meta() { ?> <section class="meta clearfix" id="single-meta"> <ul> <li class="meta-single-date"><span class="fa fa-calendar"></span><?php the_date(); ?> </li> <?php if (comments_open()) { ?> <li class="comment-scroll meta-single-comments"><span class="fa fa-comment"></span> <?php comments_popup_link(__('Leave a comment', 'wpex'), __('1 Comment', 'wpex'), __('% Comments', 'wpex'), 'comments-link', __('Comments closed', 'wpex')); ?> </li> <?php } ?> <?php if (function_exists('zilla_likes')) { ?> <li class="meta-single-zilla-likes"><?php zilla_likes(); ?> </li><?php } ?> </ul> </section><!--/meta --> <?php }
function wpex_entry_meta() { ?> <ul class="loop-entry-meta clearfix"> <li class="meta-date"><span class="fa fa-calendar"></span><?php echo get_the_date(); ?> </li> <?php if (comments_open()) { ?> <li class="meta-comments"><span class="fa fa-comment"></span> <?php comments_popup_link(__('0 comments', 'wpex'), __('1 comment', 'wpex'), __('% comments', 'wpex'), 'comments-link', __('comments closed', 'wpex')); ?> </li> <?php } ?> <?php if (function_exists('zilla_likes')) { ?> <li class="meta-zilla-likes"><?php zilla_likes(); ?> </li><?php } ?> </ul> <!-- /loop-entry-meta --> <?php }
</div> <!-- /author-links --> </div> <!-- /post-author-content --> </div> <!-- /post-author --> <div class="post-meta"> <p class="post-date"><?php the_time(get_option('date_format')); ?> </p> <?php if (function_exists('zilla_likes')) { zilla_likes(); } ?> <p class="post-categories"><?php the_category(', '); ?> </p> <?php if (has_tag()) { ?> <p class="post-tags"><?php the_tags('', ', '); ?>
function mpcth_portfolio_posts($query, $atts, $class = 'related') { extract(shortcode_atts(array('background_hover' => '', 'text_hover' => '', 'css_animation' => ''), $atts)); $index = 0; $count = $query->post_count; $css_id = 'mpcth_sc_' . $class . '_portfolio_' . mpcth_random_ID(5); $background_ie = $background_hover; $background_hover = 'rgba(' . implode(', ', mpcth_hex_to_rgba($background_hover, 0.95)) . ')'; $return = '<div id="' . $css_id . '" class="mpcth-sc-' . $class . '-portfolio mpcth-sc-grid-portfolio-columns-' . $count . ' mpcth-waypoint-trigger' . ($css_animation != '' ? ' mpcth-stack-animation' : '') . '"' . ($css_animation != '' ? ' data-animation-type="' . $css_animation . '"' : '') . '>'; $return .= '<ul class="mpcth-sc-grid-portfolio-list">'; if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $index++; $categories = get_the_terms(get_the_ID(), 'mpcth_portfolio_category'); $categories_str = ''; if (!empty($categories)) { $last_item = end($categories); foreach ($categories as $category) { $categories_str .= '<a class="mpcth-sc-grid-portfolio-post-category" href="' . get_term_link($category->slug, 'mpcth_portfolio_category') . '">'; if ($category == $last_item) { $categories_str .= $category->name; } else { $categories_str .= $category->name . ', '; } $categories_str .= '</a>'; } } if (function_exists('zilla_likes')) { ob_start(); zilla_likes(); $zilla_likes = ob_get_contents(); ob_end_clean(); } if ($index == $count) { $return .= '<li class="mpcth-sc-grid-portfolio-post last-item">'; } else { $return .= '<li class="mpcth-sc-grid-portfolio-post">'; } if (has_post_thumbnail(get_the_ID())) { $return .= get_the_post_thumbnail(get_the_ID(), 'mpcth-post-thumbnails-col-3', array('class' => "mpcth-sc-grid-portfolio-post-thumb")); } $return .= '<div class="mpcth-sc-grid-portfolio-post-info-wrap">'; $return .= '<div class="mpcth-sc-grid-portfolio-post-info">'; $return .= '<h6 class="mpcth-sc-grid-portfolio-post-title">'; $return .= '<a href="' . get_permalink(get_the_ID()) . '">'; $return .= get_the_title(); $return .= '</a>'; $return .= '</h6>'; if (!empty($zilla_likes)) { $return .= '<div class="mpcth-sc-grid-portfolio-post-likes">' . $zilla_likes . '</div>'; } if (!empty($categories_str)) { $return .= '<div class="mpcth-sc-grid-portfolio-post-categories">' . $categories_str . '</div>'; } $return .= '</div>'; $return .= '</div>'; $return .= '</li>'; } } $return .= '</ul>'; $return .= '<div class="mpcth-clear-fix"></div>'; $return .= '</div>'; $return .= '<style>'; $return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap { background: ' . $background_ie . '; background: ' . $background_hover . '; border-bottom-color: ' . mpcth_adjust_brightness($background_ie, -20) . ' !important; }' . PHP_EOL; $return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap * { color: ' . $text_hover . '; }' . PHP_EOL; $return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap *:before { color: ' . $text_hover . '; }' . PHP_EOL; $return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap:hover * { color: ' . $text_hover . '; }' . PHP_EOL; $return .= '#' . $css_id . ' .mpcth-sc-grid-portfolio-list .mpcth-sc-grid-portfolio-post-info-wrap:hover *:before { color: ' . $text_hover . '; }' . PHP_EOL; $return .= '</style>'; $return = parse_shortcode_content($return); return $return; }
function block($instance) { extract($instance); isset($filter) ? '' : ($filter = 'all'); isset($blog_filter) ? '' : ($blog_filter = 'all'); isset($lightbox) ? '' : ($lightbox = 0); $unique = wp_rand(0, 10000); $portfolio_query = new WP_Query('post_type=' . $post_type . '&posts_per_page=6'); if ($post_type == 'portfolio' && !($filter == 'all')) { $portfolio_query = ''; $portfolio_query = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 6, 'tax_query' => array(array('taxonomy' => 'portfolio-category', 'field' => 'id', 'terms' => $filter)))); } elseif ($post_type == 'post' && !($blog_filter == 'all')) { $portfolio_query = ''; $portfolio_query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 6, 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'id', 'terms' => $blog_filter)))); } if ($title) { echo '<h4 class="section-title">' . $title . '</h4>'; } ?> <div class="showbiz-container posts" id="carousel_<?php echo $unique; ?> "> <div class="showbiz-navigation"> <a id="showbiz_left_<?php echo $unique; ?> " class="sb-navigation-left btn"></a> <a id="showbiz_right_<?php echo $unique; ?> " class="sb-navigation-right btn rm0"></a> <div class="sbclear"></div> </div> <div class="showbiz portfolio" data-left="#showbiz_left_<?php echo $unique; ?> " data-right="#showbiz_right_<?php echo $unique; ?> "> <div class="overflowholder"> <ul> <?php if ($portfolio_query->have_posts()) { while ($portfolio_query->have_posts()) { $portfolio_query->the_post(); global $post; $url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?> <?php /** * If post type is portfolio */ if ($post_type == 'portfolio') { ?> <li class="post"> <div class="mediaholder"> <?php if ($lightbox == 0) { ?> <div class="mediaholder_innerwrap overlay cap-icon enlarge"> <a href="<?php echo $url[0]; ?> " class="view" data-rel="lightbox" title="<?php the_title(); ?> "> <?php } else { ?> <div class="mediaholder_innerwrap overlay cap-icon more"> <a href="<?php the_permalink(); ?> "> <?php } ?> <?php the_post_thumbnail('portfolio-index'); ?> <div></div> </a> </div> </div> <div class="detailholder"> <h4 class="post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h4> <div class="meta"> <?php echo ebor_the_simple_terms_links(); if (get_post_meta($post->ID, '_cmb_the_client', true)) { echo ' / ' . __('Client: ', 'marble') . get_post_meta($post->ID, '_cmb_the_client', true); } ?> </div> <?php the_excerpt(); ?> </div> </li> <?php /** * Otherwise (if post type is post) */ } else { ?> <li class="post"> <div class="mediaholder"> <div class="mediaholder_innerwrap overlay cap-icon more"> <a href="<?php the_permalink(); ?> "> <?php the_post_thumbnail('portfolio-index'); ?> <div></div> </a> </div> </div> <div class="detailholder"> <h4 class="post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h4> <div class="meta"> <span class="date"><?php the_time(get_option('date_format')); ?> </span> <span class="sep">/</span> <span class="comments"><a href="<?php comments_link(); ?> "><?php comments_number(__('0 Comments', 'marble'), __('1 Comment', 'marble'), __('% Comments', 'marble')); ?> </a></span> <?php if (function_exists('zilla_likes')) { ?> <span class="sep">/</span> <span class="likes"><?php zilla_likes(); ?> </span> <?php } ?> </div> <?php the_excerpt(); ?> </div> </li> <?php } ?> <?php } } wp_reset_query(); ?> </ul> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> </div> <script type="text/javascript"> /*-----------------------------------------------------------------------------------*/ /* SHOWBIZ POSTS /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function($) { jQuery('#carousel_<?php echo $unique; ?> ').showbizpro({ dragAndScroll:"off", visibleElementsArray:[3,3,3,1], mediaMaxHeight:[0,0,0,0], carousel:"off", heightOffsetBottom:0, rewindFromEnd:"off", autoPlay:"off", delay:2000, speed:250 }); }); </script> <?php }
function baskerville_meta() { ?> <div class="post-meta"> <a class="post-date" href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> "><?php the_time('Y/m/d'); ?> </a> <?php if (function_exists('zilla_likes')) { zilla_likes(); } if (comments_open()) { comments_popup_link('0', '1', '%', 'post-comments'); } edit_post_link(); ?> <div class="clear"></div> </div> <!-- /post-meta --> <?php }
/** @see WP_Widget::widget */ function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $number = apply_filters('widget_title', $instance['number']); $offset = apply_filters('widget_title', $instance['offset']); ?> <?php echo $before_widget; ?> <?php if ($title) { echo $before_title . $title . $after_title; } ?> <ul class="wpex-widget-recent-posts"> <?php if (is_singular()) { $exclude = get_the_ID(); } else { $exclude = ''; } global $post; $tmp_post = $post; $args = array('numberposts' => $number, 'offset' => $offset, 'post_type' => 'post', 'exclude' => $exclude, 'meta_key' => '_thumbnail_id'); $myposts = get_posts($args); foreach ($myposts as $post) { setup_postdata($post); //get featured image $thumb = get_post_thumbnail_id(); $img_url = wp_get_attachment_url($thumb, 'full'); //get full URL to image //crop image $featured_image = aq_resize($img_url, 80, 80, true); //resize & crop the image ?> <?php if ($featured_image) { ?> <li class="clearfix"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><img src="<?php echo $featured_image; ?> " alt="<?php the_title(); ?> " /></a> <div class="recent-right"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> " class="title"><?php the_title(); ?> </a> <div class="date"><span class="icon-calendar"></span><?php echo get_the_date(); ?> </div> <div class="cat"><span class="icon-folder-open"></span><?php $category = get_the_category(); echo $category[0]->cat_name; ?> </div> <?php if (function_exists('zilla_likes')) { ?> <div class="likes"><?php zilla_likes(); ?> </div><?php } ?> </div> </li> <?php } ?> <?php } ?> <?php $post = $tmp_post; wp_reset_postdata(); ?> </ul> <?php echo $after_widget; ?> <?php }