?> <?php if (tie_get_option('post_cats')) { ?> <span class="post-cats"><i class="fa fa-folder"></i><?php printf('%1$s', get_the_category_list(', ')); ?> </span> <?php } ?> <?php if (tie_get_option('post_comments')) { ?> <span class="post-comments"><i class="fa fa-comments"></i><?php comments_popup_link(__ti('Leave a comment'), __ti('1 Comment'), __ti('% Comments')); ?> </span> <?php } if (tie_get_option('post_views')) { $text = __ti('Views'); echo tie_views($text); } ?> </p> <div class="clear"></div> <?php }
<?php global $get_meta; ?> <p class="post-meta"> <?php if( !empty( $get_meta[ 'box_meta_score' ][0] ) ) tie_get_score(); ?> <?php if( !empty( $get_meta[ 'box_meta_author' ][0] ) ): ?> <span class="post-meta-author"><i class="fa fa-user"></i><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) )?>" title=""><?php echo get_the_author() ?> </a></span> <?php endif; ?> <?php if( !empty( $get_meta[ 'box_meta_date' ][0] ) ) tie_get_time() ?> <?php if( !empty( $get_meta[ 'box_meta_cats' ][0] ) ): ?> <span class="post-cats"><i class="fa fa-folder"></i><?php printf('%1$s', get_the_category_list( ', ' ) ); ?></span> <?php endif; ?> <?php if( !empty( $get_meta[ 'box_meta_comments' ][0] ) ): ?> <span class="post-comments"><i class="fa fa-comments"></i><?php comments_popup_link( '0' , '1' , '%' ); ?></span> <?php endif; ?> <?php if( !empty( $get_meta[ 'box_meta_views' ][0] ) ): ?> <?php echo tie_views(); ?> <?php endif; ?> </p>
function tie_most_viewed($posts_number = 5, $thumb = true) { global $post; $original_post = $post; $args = array('orderby' => 'meta_value_num', 'meta_key' => 'tie_views', 'posts_per_page' => $posts_number, 'post_status' => 'publish', 'no_found_rows' => true, 'ignore_sticky_posts' => true); $popularposts = new WP_Query($args); if ($popularposts->have_posts()) { while ($popularposts->have_posts()) { $popularposts->the_post(); ?> <li <?php tie_post_class(); ?> > <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $thumb) { ?> <div class="post-thumbnail"> <a href="<?php echo get_permalink($post->ID); ?> " title="<?php the_title_attribute(); ?> " rel="bookmark"><?php the_post_thumbnail('tie-small'); ?> <span class="fa overlay-icon"></span></a> </div><!-- post-thumbnail /--> <?php } ?> <h3><a href="<?php echo get_permalink($post->ID); ?> "><?php the_title(); ?> </a></h3> <?php tie_get_score(); ?> <?php tie_get_time(); ?> <?php if (tie_get_option('post_views')) { ?> <span class="post-views-widget"><?php echo tie_views(); ?> <span> <?php } ?> </li> <?php } } $post = $original_post; wp_reset_query(); }
<?php if (!empty($get_meta['box_meta_date'][0])) { tie_get_time(); } if (!empty($get_meta['box_meta_cats'][0])) { ?> <span class="post-cats"><i class="fa fa-folder"></i><?php printf('%1$s', get_the_category_list(', ')); ?> </span> <?php } ?> <?php if (!empty($get_meta['box_meta_comments'][0])) { ?> <span class="post-comments"><i class="fa fa-comments"></i><?php comments_popup_link('0', '1', '%'); ?> </span> <?php } if (!empty($get_meta['box_meta_views'][0])) { ?> <?php echo tie_views(); } ?> </p>
function tie_posts_custom_column_views($column_name, $id) { if ($column_name === 'tie_post_views') { echo tie_views('', get_the_ID()); } }
} ?> <?php if (tie_get_option('post_comments')) { ?> <span><?php comments_popup_link(__('Leave a comment', 'tie'), __('1 Comment', 'tie'), __('% Comments', 'tie')); ?> </span> <?php } if (tie_get_option('post_views')) { ?> <span><?php echo tie_views() . ' ' . __('views', 'tie'); ?> </span> <?php } if (tie_get_option('post_likes')) { ?> <span class="entry-likes alignright"><?php tie_post_likes(); ?> </span> <?php } ?> </p> <div class="clear"></div>