echo ' <span class="sep sep-1"> / </span> '; echo '<a href="' . esc_url(get_permalink()) . '#reviews" class="to-comments-link reviews-smoothscroll">' . $comment_number . ' '; echo $comment_number == 1 ? __('Review', 'ThemeStockyard') : __('Reviews', 'ThemeStockyard'); echo '</a>' . "\n"; } } else { echo ' <span class="sep sep-2"> / </span> '; echo '<span class="mimic-small">'; echo __('By', 'ThemeStockyard') . ' '; echo '<span class="author vcard">'; echo '<a href="' . get_author_posts_url($post->post_author) . '">' . get_the_author_meta('display_name', $post->post_author) . '</a>'; echo '</span>'; echo '</span>'; if (ts_option_vs_default('show_titlebar_post_view_count', 0) == 1) { $ts_postview_nonce = wp_create_nonce('ts_update_postviews_nonce'); $post_view_count = ts_postmeta_vs_default($ts_page_id, '_p_ts_postviews', 0); $post_view_count = !$post_view_count ? '0' : $post_view_count; $post_view_count_text = sprintf(_n('1 view', '%s views', $post_view_count, 'ThemeStockyard'), $post_view_count); echo ' <span class="sep sep-3"> / </span> '; echo '<span id="ts-postviews" data-pid="' . esc_attr($ts_page_id) . '" data-nonce="' . esc_attr($ts_postview_nonce) . '">'; echo '<i class="fa fa-eye"></i>' . esc_html($post_view_count_text); echo '</span>'; } } } else { echo '<!-- comments closed -->' . "\n"; } ?> </div> <?php } else {
?> </div> </div> <?php } ?> <?php if ($ts_direction_links == 'yes') { ts_post_direction_nav(); } ?> <?php $show_related_option = ts_option_vs_default('show_related_blog_posts', 1) == 1 ? 'yes' : 'no'; $show_related = ts_postmeta_vs_default($post->ID, '_p_related_posts', $show_related_option); if ($show_related == '1' || $show_related == 'yes') { ?> <div class="ts-related-posts-on-single ts-post-section-inner"> <h5 class="smaller uppercase"><?php echo ts_option_vs_default('related_blog_posts_title_text', 'Related Posts'); ?> </h4> <?php $args = array('include' => 'related', 'limit' => 3, 'show_pagination' => 'no', 'media_width' => 480, 'media_height' => 360, 'title_size' => 4, 'allow_videos' => 0, 'allow_galleries' => 0); echo ts_blog('3columns', $args); ?> </div> <?php } ?>
<?php global $ts_page_id; $ts_slider_source = get_post_meta($ts_page_id, '_page_slider_source', true); $ts_slider_type = get_post_meta($ts_page_id, '_page_slider_type', true); $ts_rev_slider = get_post_meta($ts_page_id, '_page_rev_slider', true); $ts_slider_first_page = ts_postmeta_vs_default($ts_page_id, '_page_slider_first_page', 'no'); // if "first page only" is turned on, // don't include the slider. if ($ts_slider_first_page == 'yes' && get_query_var('paged', 1) > 1) { return; } // otherwise, carry on... if (in_array($ts_slider_type, array('carousel', 'flex')) && $ts_slider_source) { get_template_part('includes/_sliders/carousel-flex-slider'); } if ($ts_slider_type == 'rev' && $ts_rev_slider) { get_template_part('includes/_sliders/rev-slider'); } ?> <!-- ticker: slider --> <?php //echo ts_get_ticker('slider'); ?> <!-- /ticker: slider -->
<?php /* Template Name: Home - Alternative 4 */ $ts_page_object = get_queried_object(); $ts_page_id = is_single() ? $post->ID : get_queried_object_id(); $ts_home_alt_4_cat_left = ts_postmeta_vs_default($ts_page_id, '_page_home_alt_4_cat_left', ''); $ts_home_alt_4_cat_right = ts_postmeta_vs_default($ts_page_id, '_page_home_alt_4_cat_right', ''); global $ts_template_content; $ts_template_content = '[columns_row margin_top="0px" margin_bottom="0px"] [column size="one_fifth" last="no"] [blog_widget widget_heading="" widget_layout="vertical" limit="3" cat="' . esc_attr($ts_home_alt_4_cat_left) . '" override_widget_heading="yes" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_excerpt="yes" show_meta="yes" show_media="yes" allow_videos="no" allow_galleries="no" ignore_sticky_posts="0"][/blog_widget] [/column] [column size="three_fifth" last="no"] [blog layout="" limit="2" infinite_scroll="no" category_name="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_pagination="no" show_excerpt="yes" show_meta="yes" show_read_more="no" allow_videos="no" allow_galleries="no" ignore_sticky_posts="0"][/blog] [/column] [column size="one_fifth" last="yes"] [blog_widget widget_heading="" widget_layout="vertical" limit="3" cat="' . esc_attr($ts_home_alt_4_cat_right) . '" override_widget_heading="yes" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_excerpt="yes" show_meta="yes" show_media="yes" allow_videos="no" allow_galleries="no" ignore_sticky_posts="0"][/blog_widget] [/column] [/columns_row] [blog layout="4-column-grid" limit="4" infinite_scroll="no" category_name="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_pagination="no" show_excerpt="yes" show_meta="yes" show_read_more="no" allow_videos="no" allow_galleries="yes" ignore_sticky_posts="0"][/blog]'; get_template_part('page');
<?php /* Template Name: Sitemap */ global $smof_data, $ts_previous_posts, $ts_page_id, $ts_show_top_ticker; $ts_page_object = get_queried_object(); $ts_page_id = is_single() ? $post->ID : get_queried_object_id(); $ts_custom_css = get_post_meta($ts_page_id, '_page_css', true); $ts_show_top_ticker_option = ts_option_vs_default('show_page_top_ticker', 0) == 1 ? 'yes' : 'no'; $ts_show_top_ticker = ts_postmeta_vs_default($ts_page_id, '_page_top_ticker', $ts_show_top_ticker_option); $ts_show_sidebar_option = ts_option_vs_default('show_page_sidebar', 1) != 1 ? 'no' : 'yes'; $ts_show_sidebar = ts_postmeta_vs_default($ts_page_id, '_page_sidebar', $ts_show_sidebar_option); $ts_sidebar_position_option = ts_option_vs_default('page_sidebar_position', 'right'); $ts_sidebar_position = ts_postmeta_vs_default($ts_page_id, '_page_sidebar_position', $ts_sidebar_position_option); $ts_page_comments = ts_option_vs_default('page_comments', 0) == 1 ? true : false; get_header(); get_template_part('top'); get_template_part('title-page'); ?> <div id="main-container-wrap" class="<?php echo esc_attr(ts_main_container_wrap_class('page')); ?> "> <?php get_template_part('slider'); ?> <div id="main-container" class="container clearfix"> <div id="main" class="<?php
<?php global $smof_data, $ts_page_id; $ts_page_object = get_queried_object(); $ts_page_id = is_single() ? $post->ID : get_queried_object_id(); $ts_show_top_ticker_option = ts_option_vs_default('show_page_top_ticker', 0) == 1 ? 'yes' : 'no'; $ts_show_top_ticker = ts_postmeta_vs_default($ts_page_id, '_page_top_ticker', $ts_show_top_ticker_option); $crop_width = ts_option_vs_default('cropped_featured_image_width_full', 1040, true); $crop_height = 0; get_header(); get_template_part('top'); get_template_part('title-page'); ?> <div id="main-container-wrap" class="<?php echo esc_attr(ts_main_container_wrap_class('page')); ?> "> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div id="main-container" class="container clearfix"> <div id="main" class="no-sidebar clearfix"> <div class="entry single-entry clearfix"> <div id="ts-post-content-sidebar-wrap" class="clearfix"> <div id="ts-post-wrap"> <div id="ts-post-featured-media-wrap"> <div class="featured-photo text-center"><a href="<?php echo esc_url(get_permalink()); ?>
global $smof_data, $ts_slider_post_ids, $ts_page_id, $ts_previous_posts; $slider_margin_class = ts_postmeta_vs_default($ts_page_id, '_page_slider_bottom_margin', 'yes') == 'no' ? 'has-no-bottom-margin' : 'has-bottom-margin'; $slider_width = ts_postmeta_vs_default($ts_page_id, '_page_slider_width', 'content'); $slider_width_class = $slider_width == 'content' ? 'container' : 'full'; $slider_height_default = 500; $slider_height = preg_replace("/[^0-9]*/", "", ts_postmeta_vs_default($ts_page_id, '_page_slider_height', $slider_height_default)); $slider_height = ctype_digit($slider_height) && $slider_height > 100 ? $slider_height : $slider_height_default; $slider_height = $slider_height == 'screen' && $slider_width_class == 'full' ? 'screen' : $slider_height; if ($slider_height != 'screen') { $slider_height = ts_number_within_range($slider_height, 300, 800) ? $slider_height : $slider_height_default; } $slider_height_class = $slider_height == 'screen' ? 'slider-screen-height' : ''; $slider_carousel_height = preg_replace("/[^0-9]*/", "", ts_postmeta_vs_default($ts_page_id, '_page_slider_carousel_height', '420')); $slider_text_align = ts_postmeta_vs_default($ts_page_id, '_page_slider_text_align', 'left'); $slider_text_align = in_array($slider_text_align, array('left', 'center', 'right')) ? $slider_text_align : 'left'; $slider_allow_vids = ts_postmeta_vs_default($ts_page_id, '_page_slider_allow_videos', 'no'); $slider_allow_vids = $slider_allow_vids == 'yes' ? true : false; $ts_slider_type = get_post_meta($ts_page_id, '_page_slider_type', true); $ts_slider_parallax = get_post_meta($ts_page_id, '_page_slider_enable_parallax', true); $ts_slider_source = get_post_meta($ts_page_id, '_page_slider_source', true); $ts_slider_blog_post_ids = get_post_meta($ts_page_id, '_page_slider_blog_post_ids', true); $ts_slider_category = get_post_meta($ts_page_id, '_page_slider_category', true); $ts_slider_blog_cats = get_post_meta($ts_page_id, '_page_slider_blog_cats'); // array $ts_slider_portfolio_cats = get_post_meta($ts_page_id, '_page_slider_portfolio_cats', true); $ts_slider_count = get_post_meta($ts_page_id, '_page_slider_count', true); $ts_slider_count = $ts_slider_count ? $ts_slider_count : 10; $get_alt_text = ts_option_vs_default('featured_image_alt_text_within_loop', 0) ? true : false; $slider_button_color = ts_option_vs_default('flexslider_button_color', 'white'); if (in_array($ts_slider_type, array('carousel', 'flex')) && $ts_slider_source) { $parallax_class = $slider_width_class == 'full' && $ts_slider_parallax == 'yes' ? 'ts-is-parallax' : '';
<?php global $ts_page_id; if (function_exists('putRevSlider')) { $slider_width = ts_postmeta_vs_default($ts_page_id, '_page_slider_width', 'fullwidth'); $slider_width_class = $slider_width == 'content' ? 'container' : 'full'; $rev_slider_id = get_post_meta($ts_page_id, '_page_rev_slider', true); if (get_post_meta($ts_page_id, '_page_slider_type', true) == 'rev' && $rev_slider_id) { echo '<div id="main-slider-wrap" class="ts-slider-wrap ts-rev-slider-wrap clear ' . esc_attr($slider_width_class) . '">' . "\n"; putRevSlider($rev_slider_id); echo '</div>'; } }
<?php /* Template Name: Home - Alternative 3 */ $ts_page_object = get_queried_object(); $ts_page_id = is_single() ? $post->ID : get_queried_object_id(); $ts_home_alt_3_cat = ts_postmeta_vs_default($ts_page_id, '_page_home_alt_3_cat', ''); global $ts_template_content; $ts_template_content = '[columns_row margin_top="0px" margin_bottom="0px"] [column size="two_third" last="no"] [blog_slider limit="3" category_name="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" title_size="" text_align="center" allow_videos="yes" image_size="medium" ignore_sticky_posts="0"][/blog_slider] [/column] [column size="one_third" last="yes"] [blog_widget widget_heading="" widget_layout="vertical" limit="2" cat="' . esc_attr($ts_home_alt_3_cat) . '" override_widget_heading="yes" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_excerpt="no" show_meta="yes" show_media="first" allow_videos="yes" allow_galleries="yes" ignore_sticky_posts="0"][/blog_widget] [/column] [/columns_row] [divider height="40"] [blog_banner columns="2" limit="6" fullwidth="no" infinite_scroll="no" category_name="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" show_pagination="no" ignore_sticky_posts="0"][/blog_banner] [blog layout="3-column-grid" limit="3" infinite_scroll="no" category_name="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_pagination="no" show_excerpt="yes" show_meta="yes" show_read_more="no" allow_videos="yes" allow_galleries="yes" ignore_sticky_posts="0"][/blog]'; get_template_part('page');
function ts_update_postviews() { if (!wp_verify_nonce($_REQUEST['nonce'], "ts_update_postviews_nonce")) { exit('no funny business'); } if (ts_option_vs_default('show_titlebar_post_view_count', 0) == 1) { $post = get_post($_POST['pid']); if (is_object($post) && isset($post->ID)) { $post_view_count = ts_postmeta_vs_default($post->ID, '_p_ts_postviews', 0); $post_view_count_text = sprintf(_n('1 view', '%s views', $post_view_count, 'ThemeStockyard'), $post_view_count); $post_view_count++; update_post_meta($post->ID, '_p_ts_postviews', $post_view_count); return $post_view_count_text; } } exit; }
$ts_previous_posts[] = $ts_page_id; $ts_show_top_ticker_option = ts_option_vs_default('show_post_top_ticker', 0) == 1 ? 'yes' : 'no'; $ts_show_top_ticker = ts_postmeta_vs_default($ts_page_id, '_post_top_ticker', $ts_show_top_ticker_option); $ts_show_sidebar_option = ts_option_vs_default('show_post_sidebar', 1) != 1 ? 'no' : 'yes'; $ts_show_sidebar = ts_postmeta_vs_default($post->ID, '_p_sidebar', $ts_show_sidebar_option); $ts_show_sidebar_class = $ts_show_sidebar == 'yes' ? 'has-sidebar' : 'no-sidebar'; $ts_sidebar_position_option = ts_option_vs_default('post_sidebar_position', 'right'); $ts_sidebar_position = ts_postmeta_vs_default($post->ID, '_p_sidebar_position', $ts_sidebar_position_option); $ts_direction_links_option = ts_option_vs_default('post_show_direction_links', 'yes'); $ts_direction_links = ts_postmeta_vs_default($post->ID, '_p_show_direction_links', $ts_direction_links_option); $ts_sharing_position_option = ts_option_vs_default('sharing_options_position_on_post', 'top'); $ts_sharing_position = ts_postmeta_vs_default($post->ID, '_p_sharing_options_position', $ts_sharing_position_option); $ts_show_featured_media_option = ts_option_vs_default('show_images_on_post', 1) == 1 ? 'yes' : 'no'; $ts_show_featured_media = ts_postmeta_vs_default($post->ID, '_p_show_featured_image_on_single', $ts_show_featured_media_option); $crop_images_option = ts_option_vs_default('crop_images_on_post', 1) ? 'yes' : 'no'; $crop_images = ts_postmeta_vs_default($post->ID, '_p_crop_images', $crop_images_option); if ($ts_show_sidebar == 'yes' && in_array($ts_sidebar_position, array('left', 'right'))) { if (in_array($crop_images, array('1', 'yes', 'true'))) { $crop_width = ts_option_vs_default('cropped_featured_image_width', 740, true); $crop_height = ts_option_vs_default('cropped_featured_image_height', 480, true); } else { $crop_width = ts_option_vs_default('cropped_featured_image_width', 740, true); $crop_height = 0; } } else { if (in_array($crop_images, array('1', 'yes', 'true'))) { $crop_width = ts_option_vs_default('cropped_featured_image_width_full', 1100, true); $crop_height = ts_option_vs_default('cropped_featured_image_height_full', 540, true); } else { $crop_width = ts_option_vs_default('cropped_featured_image_width_full', 1100, true); $crop_height = 0;
<?php /* * The Sidebar containing the primary and secondary widget areas. */ global $smof_data, $ts_page_id, $post, $ts_grab_home_sidebar, $ts_show_sidebar, $ts_sidebar_position, $ts_sidebar_instance; if (!isset($ts_show_sidebar) || ts_is_woo_shop()) { if (is_single()) { $ts_show_sidebar = ts_postmeta_vs_default($ts_page_id, '_p_sidebar', 'yes'); } else { $ts_show_sidebar = ts_postmeta_vs_default($ts_page_id, '_page_sidebar', 'yes'); } } if ($ts_show_sidebar == 'yes') { $ts_sbs = $ts_sidebar_selection_id = ''; $ts_sidebar_selection = get_post_meta($ts_page_id, '_sbg_selected_sidebar_replacement', true); $ts_sidebar_selection = is_array($ts_sidebar_selection) ? $ts_sidebar_selection[0] : $ts_sidebar_selection; if ($ts_sidebar_selection && class_exists('sidebar_generator')) { $ts_sidebar_selection_options = sidebar_generator::get_sidebars(); $ts_sidebar_selection_name = $ts_sbs = str_replace(array("\n", "\r", "\t", ' '), '', $ts_sidebar_selection); $ts_sidebar_selection_id = sidebar_generator::name_to_class($ts_sidebar_selection_name); if (!isset($ts_sidebar_selection_options[$ts_sidebar_selection_id])) { $ts_sidebar_selection = 0; } } ?> <div id="sidebar" class="<?php echo esc_attr($ts_sbs); ?> sidebar <?php