<h2 class="post-box-title"><a href="<?php the_permalink(); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('framework/parts/meta-blocks'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _eti('Read More »'); ?> </a> </div> </li><!-- .first-news --> <?php } else { ?> <li <?php
function get_home_cats($cat_data) { global $columns; $Cat_ID = $cat_data['id']; $offset = $Posts_num = $order = $rand = ''; if (!empty($cat_data['number'])) { $Posts_num = $cat_data['number']; } if (!empty($cat_data['order'])) { $order = $cat_data['order']; } if (!empty($cat_data['offset'])) { $offset = $cat_data['offset']; } if ($order == 'rand') { $rand = "&orderby=rand"; } $cat_query = new WP_Query('cat=' . $Cat_ID . '&no_found_rows=1&posts_per_page=' . $Posts_num . $rand . '&offset=' . $offset); $cat_title = get_the_category_by_ID($Cat_ID); $count = 0; $home_layout = $cat_data['style']; ?> <?php if ($home_layout == '2c') { //************** 2C ****************************************************** ?> <?php $columns++; ?> <section class="cat-box column2 tie-cat-<?php echo $Cat_ID; ?> <?php if ($columns == 2) { echo 'last-column'; $columns = 0; } ?> "> <h2 class="cat-box-title"><a href="<?php echo get_category_link($Cat_ID); ?> "><?php echo $cat_title; ?> </a></h2> <div class="cat-box-content"> <?php if ($cat_query->have_posts()) { ?> <ul> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); $count++; ?> <?php if ($count == 1) { ?> <li class="first-news"> <div class="inner-content"> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-large'); ?> <?php tie_get_score(true); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> </div> </li><!-- .first-news --> <?php } else { ?> <li> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-small'); ?> <?php tie_get_score(); ?> </a> </div><!-- post-thumbnail /--> <?php } ?> <h3 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h3> <?php get_template_part('includes/boxes-meta'); ?> </li> <?php } ?> <?php } ?> </ul> <?php } ?> </div><!-- .cat-box-content /--> </section> <!-- Two Columns --> <?php } elseif ($home_layout == '1c') { //************** 1C ****************************************************** ?> <section class="cat-box wide-box tie-cat-<?php echo $Cat_ID; ?> "> <h2 class="cat-box-title"><a href="<?php echo get_category_link($Cat_ID); ?> "><?php echo $cat_title; ?> </a></h2> <div class="cat-box-content"> <?php $count = 0; $count2 = 0; if ($cat_query->have_posts()) { ?> <ul> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); $count++; ?> <?php if ($count == 1) { ?> <li class="first-news"> <div class="inner-content"> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-large'); ?> <?php tie_get_score(true); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> </div> </li><!-- .first-news --> <?php } else { $count2++; ?> <li <?php if ($count2 == 2) { echo 'class="last-column"'; $count2 = 0; } ?> > <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-small'); ?> <?php tie_get_score(); ?> </a> </div><!-- post-thumbnail /--> <?php } ?> <h3 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h3> <?php get_template_part('includes/boxes-meta'); ?> </li> <?php } ?> <?php } ?> </ul> <div class="clear"></div> <?php } ?> </div><!-- .cat-box-content /--> </section><!-- Wide Box --> <?php } else { //************** list ********************************************************************************** ?> <section class="cat-box list-box tie-cat-<?php echo $Cat_ID; ?> "> <h2 class="cat-box-title"><a href="<?php echo get_category_link($Cat_ID); ?> "><?php echo $cat_title; ?> </a></h2> <div class="cat-box-content"> <?php if ($cat_query->have_posts()) { ?> <ul> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); $count++; ?> <?php if ($count == 1) { ?> <li class="first-news"> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-large'); ?> <?php tie_get_score(true); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> </li><!-- .first-news --> <?php } else { ?> <li class="other-news"> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-small'); ?> <?php tie_get_score(); ?> </a> </div><!-- post-thumbnail /--> <?php } ?> <h3 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h3> <?php get_template_part('includes/boxes-meta'); ?> </li> <?php } ?> <?php } ?> </ul> <div class="clear"></div> <?php } ?> </div><!-- .cat-box-content /--> </section><!-- List Box --> <?php } ?> <?php }
function get_home_recent($cat_data) { $count_recent = 0; $exclude = $Posts_num = $Box_Title = $display = $pagination = $offset = ''; if (!empty($cat_data['exclude'])) { $exclude = $cat_data['exclude']; } if (!empty($cat_data['number'])) { $Posts_num = $cat_data['number']; } if (!empty($cat_data['title'])) { $Box_Title = $cat_data['title']; } if (!empty($cat_data['display'])) { $display = $cat_data['display']; } if (!empty($cat_data['pagi'])) { $pagination = $cat_data['pagi']; } if (!empty($cat_data['offset'])) { $offset = $cat_data['offset']; } $args = array('posts_per_page' => $Posts_num, 'category__not_in' => $exclude, 'offset' => $offset, 'ignore_sticky_posts' => 1); if (!empty($pagination) && $pagination == 'y') { $args['paged'] = get_query_var('paged'); } else { $args['no_found_rows'] = 1; } $cat_query = new WP_Query($args); ?> <section class="cat-box recent-box"> <h2 class="cat-box-title"><?php if (function_exists('icl_t')) { echo icl_t(theme_name, $cat_data['boxid'], $Box_Title); } else { echo $Box_Title; } ?> </h2> <div class="cat-box-content"> <?php if ($cat_query->have_posts()) { ?> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); ?> <?php if ($display == 'blog') { $count_recent++; ?> <article class="item-list recent-post<?php echo $count_recent; ?> recent-post-<?php echo $display; ?> "> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php $image_id = get_post_thumbnail_id($post->ID); echo $image_url = wp_get_attachment_image($image_id, array(300, 160)); ?> <?php tie_get_score(true); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> <?php if (tie_get_option('archives_socail')) { get_template_part('includes/post-share'); } // Get Share Button template ?> <div class="clear"></div> </article><!-- .item-list --> <?php } else { ?> <div class="recent-item"> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-large'); ?> <?php tie_get_score(); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h3 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h3> <p class="post-meta"> <?php tie_get_time(); ?> </p> </div> <?php } ?> <?php } ?> <div class="clear"></div> <?php } ?> </div><!-- .cat-box-content /--> </section> <?php if (!empty($pagination) && $pagination == 'y' && empty($offset) && $cat_query->max_num_pages > 1) { ?> <div class="recent-box-pagination"><?php tie_pagenavi($cat_query, $Posts); ?> </div> <?php } ?> <div class="clear"></div> <?php }
function get_home_wide_cat($cat_data) { $count = 0; $Cat_ID = $cat_data['id']; $offset = $Posts_num = $order = $rand = ''; if (!empty($cat_data['number'])) { $Posts_num = $cat_data['number']; } if (!empty($cat_data['order'])) { $order = $cat_data['order']; } if (!empty($cat_data['offset'])) { $offset = $cat_data['offset']; } if ($order == 'rand') { $rand = "&orderby=rand"; } $cat_query = new WP_Query('cat=' . $Cat_ID . '&no_found_rows=1&posts_per_page=' . $Posts_num . $rand . '&offset=' . $offset); $cat_title = get_the_category_by_ID($Cat_ID); ?> <section class="cat-box wide-cat-box tie-cat-<?php echo $Cat_ID; ?> "> <h2 class="cat-box-title"><a href="<?php echo get_category_link($Cat_ID); ?> "><?php echo $cat_title; ?> </a></h2> <div class="cat-box-content"> <?php if ($cat_query->have_posts()) { ?> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); $count++; ?> <div class="wide-news-item<?php if ($count == 4) { echo ' last-col'; } elseif ($count == 2) { echo ' last-col2'; } ?> "> <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php the_post_thumbnail('tie-large'); ?> <?php tie_get_score(true); ?> </a> </div><!-- post-thumbnail /--> <?php } else { ?> <div class="empty-space"></div> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <p><?php tie_excerpt_home(); ?> </p> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> </div> <?php if ($count == 4) { echo '<div class="clear"></div>'; $count = 0; } ?> <?php } ?> <div class="clear"></div> <?php } ?> </div><!-- .cat-box-content /--> </section><!-- List Box --> <?php }
function tie_home_tabs() { $home_tabs_active = tie_get_option('home_tabs_box'); $home_tabs = tie_get_option('home_tabs'); $Posts = 5; if ($home_tabs_active && $home_tabs) { ?> <div id="cats-tabs-box" class="cat-box-content clear cat-box"> <div class="cat-tabs-header"> <ul> <?php foreach ($home_tabs as $cat) { ?> <li><a href="#catab<?php echo $cat; ?> "><?php echo get_the_category_by_ID($cat); ?> </a></li> <?php } ?> </ul> </div> <?php $cat_num = 0; foreach ($home_tabs as $cat) { $count = 0; $cat_num++; $cat_query = new WP_Query('cat=' . $cat . '&no_found_rows=1&posts_per_page=' . $Posts); ?> <div id="catab<?php echo $cat; ?> " class="cat-tabs-wrap cat-tabs-wrap<?php echo $cat_num; ?> "> <?php if ($cat_query->have_posts()) { ?> <ul> <?php while ($cat_query->have_posts()) { $cat_query->the_post(); $count++; ?> <?php if ($count == 1) { ?> <li <?php tie_post_class('first-news'); ?> > <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php tie_thumb('tie-medium'); ?> <span class="overlay-icon"></span> </a> </div><!-- post-thumbnail /--> <?php } ?> <h2 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php get_template_part('includes/boxes-meta'); ?> <div class="entry"> <?php tie_excerpt_home(); ?> <a class="more-link" href="<?php the_permalink(); ?> "><?php _e('Read More »', 'tie'); ?> </a> </div> </li><!-- .first-news --> <?php } else { ?> <li <?php tie_post_class(); ?> > <?php if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php tie_thumb(); ?> <span class="overlay-icon"></span></a> </div><!-- post-thumbnail /--> <?php } ?> <h3 class="post-box-title"><a href="<?php the_permalink(); ?> " title="<?php printf(esc_attr__('Permalink to %s', 'tie'), the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a></h3> <?php get_template_part('includes/boxes-meta'); ?> </li> <?php } ?> <?php } ?> </ul> <div class="clear"></div> <?php } ?> </div> <?php } ?> </div><!-- #cats-tabs-box /--> <?php } }
if( $check_also_query->have_posts() ) :?> <section id="check-also-box" class="post-listing check-also-<?php echo $check_also_position?>"> <a href="#" id="check-also-close"><i class="fa fa-close"></i></a> <div class="block-head"> <h3><?php _eti( 'Check Also' ); ?></h3> </div> <?php while ( $check_also_query->have_posts() ) : $check_also_query->the_post()?> <div <?php tie_post_class( 'check-also-post' ); ?>> <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail( 'tie-medium' ); ?> <span class="fa overlay-icon"></span> </a> </div><!-- post-thumbnail /--> <?php endif; ?> <h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <p><?php tie_excerpt_home() ?></p> </div> <?php endwhile;?> </section> <?php endif; $post = $original_post; wp_reset_query(); endif; ?>