/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { echo $args['before_widget']; ?> <?php echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; ?> <?php woocommerce_catalog_ordering(); ?> <?php echo $args['after_widget']; }
function yit_wc_catalog_ordering() { if (!is_single() && have_posts()) { woocommerce_catalog_ordering(); } }
function avia_woocommerce_advanced_title() { global $wp_query; $titleClass = ""; $image = ""; if (isset($wp_query->query_vars['taxonomy'])) { $term = get_term_by('slug', get_query_var($wp_query->query_vars['taxonomy']), $wp_query->query_vars['taxonomy']); $attachment_id = get_woocommerce_term_meta($term->term_id, 'thumbnail_id'); if (!empty($term->description)) { $titleClass .= "title_container_description "; } } if (!empty($attachment_id)) { $titleClass .= "title_container_image "; $image = wp_get_attachment_image($attachment_id, 'thumbnail', false, array('class' => 'category_thumb')); } echo "<div class='title_container {$titleClass}'>"; echo avia_breadcrumbs(); woocommerce_catalog_ordering(); echo $image; }
/** * Display a tool bar on top of product archive * * @since 1.0 */ function shop_tool_bar() { $numbers = array(9, 12, 15, 18, 21); if ($this->layout == 'full-content') { $numbers = array(8, 12, 16, 20, 24); } /** * Allow child theme/plugin to modify the numbers array * * @since 1.1 */ $number = apply_filters('bigboom_shop_product_numbers', $numbers, $this->layout); $options = array(); $showposts = get_query_var('posts_per_page'); foreach ($numbers as $number) { $options[] = sprintf('<option value="%s" %s>%s %s</option>', esc_attr($number), selected($number, $showposts, false), $number, __('items', 'bigboom')); } ?> <div class="shop-toolbar"> <div class="sorter clearfix"> <div class="shop-view col-xs-12 col-sm-4 hidden-xs hidden-sm"> <span><?php _e('View as', 'bigboom'); ?> :</span> <a href="#" class="grid-view <?php echo $this->shop_view == 'grid' ? 'current' : ''; ?> " data-view="grid"><?php _e('Grid', 'bigboom'); ?> </a> / <a href="#" class="list-view <?php echo $this->shop_view == 'list' ? 'current' : ''; ?> " data-view="list"><?php _e('List', 'bigboom'); ?> </a> </div> <div class="sort-by col-xs-12 col-sm-4 hidden-xs hidden-sm"> <span><?php _e('Sort by', 'bigboom'); ?> :</span> <?php woocommerce_catalog_ordering(); ?> </div> <div class="limiter col-xs-12 col-sm-4 hidden-xs hidden-sm"> <form class="shop-products-number" method="get"> <span><?php _e('Show', 'bigboom'); ?> :</span> <select name="showposts"> <?php echo implode('', $options); ?> </select> <?php foreach ($_GET as $name => $value) { if ('showposts' != $name) { printf('<input type="hidden" name="%s" value="%s">', esc_attr($name), esc_attr($value)); } } ?> </form> </div> </div> <div class="pager clearfix"> <?php woocommerce_result_count(); ?> <?php woocommerce_pagination(); ?> </div> </div> <?php }
function yiw_woocommerce_ordering() { if (!is_single() && yiw_get_option('shop_show_woocommerce_ordering')) { woocommerce_catalog_ordering(); } }
function cruxstore_woocommerce_shop_loop() { $shop_header_tool_bar = cruxstore_option('shop_header_tool_bar', 1); if ($shop_header_tool_bar) { if ($shop_header_tool_bar == 2) { echo '<div class="products-shop-header">'; cruxstore_category_menu(); echo '</div>'; } else { echo '<div class="products-tools">'; woocommerce_result_count(); woocommerce_catalog_ordering(); cruxstore_woocommerce_gridlist_toggle(); echo '</div>'; } } }
function mango_woocommerce_before_shop_loop() { global $mango_settings; mango_taxonomy_banner(); ?> <div class="filter-row clearfix"> <?php if (!woocommerce_products_will_display()) { ?> </div> <?php return; } ?> <?php add_filter("woocommerce_catalog_orderby", function ($catalog_orderby_options) { $catalog_orderby_options = array('menu_order' => __('Default Sorting', 'mango'), 'popularity' => __('Popularity', 'mango'), 'rating' => __('Average Rating', 'mango'), 'date' => __('Latest', 'mango'), 'price' => __('Lowest Price', 'mango'), 'price-desc' => __('Highest Price', 'mango')); return $catalog_orderby_options; }); woocommerce_catalog_ordering(); ?> <div class="filter-row-box second"> <form method="get"> <?php if (isset($_GET) && !empty($_GET)) { foreach ($_GET as $k => $v) { if ($k != 'view') { ?> <input type="hidden" name="<?php echo esc_attr($k); ?> " value="<?php echo esc_attr($v); ?> "/> <?php } } } ?> <button type="submit" name="view" value="grid" class="btn <?php echo mango_shop_view() == 'grid' ? 'active' : ''; ?> " title="Grid"><i class="fa fa-th"></i></button> <button type="submit" name="view" value="list" class="btn <?php echo mango_shop_view() == 'list' ? 'active' : ''; ?> " title="List"><i class="fa fa-th-list"></i></button> </form> </div> <!-- End .filter-row-box --> <div class="clearfix visible-xs"></div> <!-- End .clearfix --> <div class="filter-row-box last"> <span class="filter-row-label"><?php _e("Show", 'mango'); ?> </span> <div class="small-selectbox quantity-selectbox clearfix"> <?php $products_perpage = isset($mango_settings['mango_products_perpage']) && $mango_settings['mango_products_perpage'] ? $mango_settings['mango_products_perpage'] : '9,15,30'; $pr_p_ar = explode(",", $products_perpage); if (isset($_GET['perpage']) && !in_array($_GET['perpage'])) { $pr_p_ar[] = $_GET['perpage']; } $current = isset($_GET['perpage']) && $_GET['perpage'] ? $_GET['perpage'] : $pr_p_ar[0]; ?> <form method="get"> <?php if (isset($_GET) && !empty($_GET)) { foreach ($_GET as $k => $v) { if ($k != 'perpage') { ?> <input type="hidden" name="<?php echo esc_attr($k); ?> " value="<?php echo esc_attr($v); ?> "/> <?php } } } ?> <select id="number" name="perpage" class="selectbox" onchange="this.form.submit()"> <?php foreach ($pr_p_ar as $number) { ?> <option value="<?php echo esc_attr($number); ?> " <?php selected($number, $current); ?> ><?php echo esc_attr($number); ?> </option> <?php } ?> </select> </form> </div> <!-- End .normal-selectbox--> <span class="filter-row-label hidden-xss"><?php _e("per page", 'mango'); ?> </span> </div> <!-- End .filter-row-box --> <nav class="filter-row-box right woocommerce-pagination"> <?php woocommerce_pagination(); ?> </nav> <!-- End .filter-row-box --> </div><!-- End .filter-row --> <?php }
?> <div class="section_before_shop_loop clearfix"> <?php if (!of_get_option('tokopress_wc_hide_result_count')) { ?> <?php woocommerce_result_count(); ?> <?php } ?> <?php if (!of_get_option('tokopress_wc_hide_catalog_ordering')) { ?> <?php woocommerce_catalog_ordering(); ?> <?php } ?> </div> <?php } ?> <?php } ?> <?php woocommerce_product_loop_start(); ?>
protected function _render($options) { global $woocommerce; $columns = (int) $this->getParam('postColumns'); $rowSpan = 12 / $columns; $foundPosts = count($this->posts); $rowClass = array('row-fluid', 'products'); if ($this->shouldPaginate) { $rowClass[] = 'slides-container'; } $counter = 1; if ($this->getParam('layout') === 'grid' && $this->getParam('foundResultsDisplay') === 'true') { woocommerce_result_count(); } if ($this->getParam('layout') === 'grid' && $this->getParam('sortingDisplay') === 'true') { woocommerce_catalog_ordering(); } ?> <div class="<?php echo implode(' ', $rowClass); ?> "> <?php while (have_posts()) { the_post(); ?> <?php $spanClass = array('span' . $rowSpan, 'gumm-filterable-item'); if ($this->shouldPaginate && $counter > $columns) { $spanClass[] = 'hidden'; } ?> <div <?php post_class(implode(' ', $spanClass)); ?> > <?php do_action('woocommerce_before_shop_loop_item'); ?> <a href="<?php the_permalink(); ?> "> <?php /** * woocommerce_before_shop_loop_item_title hook * * @hooked woocommerce_show_product_loop_sale_flash - 10 * @hooked woocommerce_template_loop_product_thumbnail - 10 */ do_action('woocommerce_before_shop_loop_item_title'); ?> <h3><?php the_title(); ?> </h3> <?php /** * woocommerce_after_shop_loop_item_title hook * * @hooked woocommerce_template_loop_price - 10 */ do_action('woocommerce_after_shop_loop_item_title'); ?> </a> <?php do_action('woocommerce_after_shop_loop_item'); ?> </div> <?php if ($counter % $columns === 0 && $counter < $foundPosts && $this->getParam('layout') === 'grid') { echo '</div><div class="' . implode(' ', $rowClass) . '">'; } $counter++; ?> <?php } // end of the loop. ?> </div> <?php do_action('gumm_woocommerce_print_pretty_photo_hidden_links'); }
/** * Display shop loop results count and ordering. */ public function shop_loop_info() { echo '<div class="edu-shop-loop-info">'; woocommerce_catalog_ordering(); woocommerce_result_count(); echo '</div>'; }
function hocwp_wc_filter_product_by_sort_type() { woocommerce_catalog_ordering(); }
function yit_woocommerce_catalog_ordering() { if ( ! is_single() ) { woocommerce_catalog_ordering(); } }
public static function prdctfltr_respond_550() { if (!is_array($_POST)) { die(0); exit; } $set = array('pf_request' => array(), 'pf_requested' => array(), 'pf_filters' => array(), 'pf_mode' => 'archive', 'pf_widget_title' => null, 'pf_set' => 'shortcode', 'pf_paged' => '', 'pf_pagefilters' => array(), 'pf_shortcode' => null, 'pf_offset' => 0, 'pf_restrict' => '', 'pf_adds' => array(), 'pf_orderby_template' => null, 'pf_count_template' => null); $opt = array(); foreach ($set as $k => $v) { if (isset($_POST[$k]) && $_POST[$k] !== '') { $opt[$k] = $_POST[$k]; } else { $opt[$k] = $v; } } self::$settings['opt'] = $opt; $pf_request = isset($opt['pf_request']) ? $opt['pf_request'] : array(); $pf_requested = isset($opt['pf_requested']) ? $opt['pf_requested'] : array(); if (empty($pf_request) || empty($pf_requested)) { die(0); exit; } global $prdctfltr_global; $prdctfltr_global['pagefilters'] = $opt['pf_pagefilters']; $prdctfltr_global['unique_id'] = key($pf_requested); $active_filters = isset($opt['pf_filters']) && is_array($opt['pf_filters']) ? $opt['pf_filters'] : array(); $curr_filters = array(); foreach ($active_filters as $k => $v) { $curr_filters = array_merge($curr_filters, $v); } if ($opt['pf_set'] == 'shortcode') { $prdctfltr_global['sc_init'] = true; $prdctfltr_global['sc_query'] = $opt['pf_shortcode']; $prdctfltr_global['active_permalinks'] = $opt['pf_shortcode']; if (isset($prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['atts'])) { extract($prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['atts']); $prdctfltr_global['ajax_js'] = isset($prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['args']) ? $prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['args'] : array(); $prdctfltr_global['ajax_atts'] = isset($prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['atts_sc']) ? $prdctfltr_global['pagefilters'][$prdctfltr_global['unique_id']]['atts_sc'] : array(); } else { if (is_array($prdctfltr_global['pagefilters'])) { $pf_pagefilters = $prdctfltr_global['pagefilters']; reset($pf_pagefilters); $sc_key = key($pf_pagefilters); extract($prdctfltr_global['pagefilters'][$sc_key]['atts']); $prdctfltr_global['ajax_js'] = isset($prdctfltr_global['pagefilters'][$sc_key]['args']) ? $prdctfltr_global['pagefilters'][$sc_key]['args'] : array(); $prdctfltr_global['ajax_atts'] = isset($prdctfltr_global['pagefilters'][$sc_key]['atts_sc']) ? $prdctfltr_global['pagefilters'][$sc_key]['atts_sc'] : array(); } } $prdctfltr_global['sc_ajax'] = true; $prdctfltr_global['action'] = $action !== '' ? $action : ''; $prdctfltr_global['preset'] = $preset !== '' ? $preset : ''; $prdctfltr_global['disable_overrides'] = $disable_overrides == 'yes' ? 'yes' : 'no'; $pagination_args = array('sc' => 'yes', 'ajax' => 'yes', 'type' => $pagination); } else { $prdctfltr_global['ajax_adds'] = $opt['pf_adds']; $pagination_args = array(); $use_filter = 'yes'; } if (!isset($prdctfltr_global['done_filters']) || $prdctfltr_global['done_filters'] !== true) { WC_Prdctfltr::make_global($curr_filters, 'AJAX'); } $data = array(); if ($opt['pf_mode'] == 'archive') { $query = self::make_query(); if ($opt['pf_restrict'] !== 'pagination') { foreach ($pf_request as $filter => $options) { if (in_array($filter, $pf_requested)) { ob_start(); $prdctfltr_global['unique_id'] = $filter; if ($options['widget_search'] !== 'yes') { if ($use_filter == 'yes') { include WC_Prdctfltr::$dir . 'woocommerce/loop/product-filter.php'; } } else { $widget_options = $opt['pf_request'][$filter]['widget_options']; $defaults = array('style' => 'pf_default', 'preset' => '', 'disable_overrides' => 'no', 'action' => ''); foreach ($defaults as $k => $v) { if (!isset($widget_options[$k])) { $widget_options[$k] = $v; } } if (isset($opt['pf_widget_title'])) { $curr_title = explode('%%%', $opt['pf_widget_title']); } the_widget('prdctfltr', 'preset=' . $widget_options['style'] . '&template=' . $widget_options['preset'] . '&disable_overrides=' . $widget_options['disable_overrides'], array('before_title' => stripslashes($curr_title[0]), 'after_title' => stripslashes($curr_title[1]))); } $data[$filter] = ob_get_clean(); } } } $data['products'] = self::get_products($query); if (isset($prdctfltr_global['ranges'])) { $data['ranges'] = $prdctfltr_global['ranges']; } $data['pagination'] = self::get_pagination($pagination_args); if (isset($opt['pf_count_template'])) { global $wp_query; $wp_query = $query; if ($wp_query->found_posts > 0) { ob_start(); woocommerce_result_count(); $data['count'] = ob_get_clean(); } else { $data['count'] = ''; } } if (isset($opt['pf_orderby_template'])) { if (!isset($_GET['orderby']) && isset($prdctfltr_global['active_filters']['orderby'])) { $_GET['orderby'] = $prdctfltr_global['active_filters']['orderby']; } else { if (!isset($_GET['orderby'])) { $_GET['orderby'] = 'date'; } } if (isset($_GET['orderby'])) { $orderby = $_GET['orderby']; ob_start(); woocommerce_catalog_ordering(); $data['orderby'] = ob_get_clean(); } } } wp_send_json($data); }
function thb_woocommerce_theme_before_content() { ?> <?php if (!is_product()) { ?> <header class="pageheader"> <h1><?php woocommerce_page_title(); ?> </h1> <h2><?php woocommerce_result_count(); ?> </h2> </header><!-- /.pageheader --> <?php } ?> <?php if (is_shop()) { ?> <?php woocommerce_catalog_ordering(); ?> <?php } ?> <?php get_template_part('partial-header-closure'); ?> <?php thb_page_before(); ?> <section id="content"> <?php }
public static function content($is_ajax = false) { global $wp_query; ?> <?php if (is_singular('product')) { while (have_posts()) { the_post(); wc_get_template_part('content', 'single-product'); } } else { ?> <?php /** * script * {{ */ if (!$is_ajax) { wp_enqueue_script('vendor-carouFredSel'); } ?> <?php if (apply_filters('woocommerce_show_page_title', true)) { ?> <h1 class="page-title"><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php do_action('woocommerce_archive_description'); ?> <?php $current_view_mode = dh_get_theme_option('dh_woocommerce_view_mode', 'grid'); if (isset($_GET['mode']) && in_array($_GET['mode'], array('grid', 'list'))) { $current_view_mode = $_GET['mode']; } $grid_mode_href = $current_view_mode == 'list' ? ' href="' . esc_url(add_query_arg('mode', 'grid')) . '"' : ''; $list_mode_href = $current_view_mode == 'grid' ? ' href="' . esc_url(add_query_arg('mode', 'list')) . '"' : ''; $dh_ul_product_class = ''; $woo_products_pagination = dh_get_theme_option('woo-products-pagination', 'page_num'); if ($woo_products_pagination === 'infinite_scroll') { $dh_ul_product_class = 'infinite-scroll-wrap'; } elseif ($woo_products_pagination === 'loadmore') { $dh_ul_product_class = 'loadmore-wrap'; } ?> <div class="shop-toolbar"> <?php if (!dh_get_theme_option('woo-shop-filter', 0)) { ?> <?php woocommerce_catalog_ordering(); ?> <?php } ?> <div class="view-mode"> <a class="grid-mode<?php echo $current_view_mode == 'grid' ? ' active' : ''; ?> " title="<?php esc_attr_e('Grid', 'sitesao'); ?> " <?php echo $grid_mode_href; ?> ><i class="fa fa-th"></i></a> <a class="list-mode<?php echo $current_view_mode == 'list' ? ' active' : ''; ?> " title="<?php esc_attr_e('List', 'sitesao'); ?> " <?php echo $list_mode_href; ?> ><i class="fa fa-list"></i></a> </div> <?php if (dh_get_theme_option('woo-shop-filter', 0)) { ?> <div class="filter-toggle-button"> <a class="filter" title="<?php esc_attr_e('Filter', 'sitesao'); ?> " href="#"><i class="fa fa-filter"></i> <?php esc_html_e('Filter', 'sitesao'); ?> </a> </div> <?php } ?> </div> <?php if (dh_get_theme_option('woo-shop-filter', 0) && is_active_sidebar('sidebar-shop-filter')) { ?> <div class="sidebar-shop-filter" data-toggle="shop-filter-ajax"> <?php $sidebars_widgets = wp_get_sidebars_widgets(); $count = count((array) $sidebars_widgets['sidebar-shop-filter']); $count = absint($count); ?> <div class="sidebar-shop-filter-wrap sidebar-shop-filter-<?php echo esc_attr($count); ?> "> <?php dynamic_sidebar('sidebar-shop-filter'); ?> </div> </div> <?php } ?> <div class="shop-loop-wrap <?php echo $dh_ul_product_class; ?> "> <div class="filter-ajax-loading"> <div class="fade-loading"><i></i><i></i><i></i><i></i></div> </div> <div class="shop-loop <?php echo esc_attr($current_view_mode); ?> " > <?php if (is_search() && is_post_type_archive('product')) { ?> <h3 class="woocommerce-search-text"><?php dh_page_title(); ?> </h3> <?php } ?> <?php if (have_posts()) { ?> <?php woocommerce_product_loop_start(); ?> <?php woocommerce_product_subcategories(); ?> <?php while (have_posts()) { the_post(); ?> <?php wc_get_template_part('content', 'product'); ?> <?php } // end of the loop. ?> <?php woocommerce_product_loop_end(); ?> <?php do_action('woocommerce_after_shop_loop'); ?> <?php } elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) { ?> <?php wc_get_template('loop/no-products-found.php'); ?> <?php } ?> </div> </div> <?php } }
function sf_page_heading() { global $wp_query, $post, $sf_options; $shop_page = false; $page_title = $page_subtitle = $page_title_style = $page_title_overlay_effect = $fancy_title_image_url = $article_heading_bg = $article_heading_text = $page_heading_el_class = $page_design_style = $extra_styles = $page_title_text_align = ""; $show_page_title = apply_filters('sf_page_heading_ns_pagetitle', 1); $remove_breadcrumbs = apply_filters('sf_page_heading_ns_removebreadcrumbs', 0); $breadcrumb_in_heading = 0; if (isset($sf_options['breadcrumb_in_heading'])) { $breadcrumb_in_heading = $sf_options['breadcrumb_in_heading']; } $page_title_height = 300; $page_title_style = "standard"; $next_icon = apply_filters('sf_next_icon', '<i class="ss-navigateright"></i>'); $prev_icon = apply_filters('sf_prev_icon', '<i class="ss-navigateleft"></i>'); // Shop page check if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) { $shop_page = true; } // Defaults $default_show_page_heading = $sf_options['default_show_page_heading']; $pagination_style = "standard"; if (isset($sf_options['pagination_style'])) { $pagination_style = $sf_options['pagination_style']; } // Post meta if ($post && is_singular()) { $show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true); $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true); $page_title = sf_get_post_meta($post->ID, 'sf_page_title_one', true); $page_subtitle = sf_get_post_meta($post->ID, 'sf_page_subtitle', true); $fancy_title_image = rwmb_meta('sf_page_title_image', 'type=image&size=full'); $page_title_text_style = sf_get_post_meta($post->ID, 'sf_page_title_text_style', true); $page_title_overlay_effect = sf_get_post_meta($post->ID, 'sf_page_title_overlay_effect', true); $page_title_text_align = sf_get_post_meta($post->ID, 'sf_page_title_text_align', true); $page_title_height = sf_get_post_meta($post->ID, 'sf_page_title_height', true); $page_heading_bg = sf_get_post_meta($post->ID, 'sf_page_title_bg_color', true); $page_heading_text = sf_get_post_meta($post->ID, 'sf_page_title_text_color', true); if ($page_heading_bg != "") { $article_heading_bg = 'style="background-color:' . $page_heading_bg . ';border-color:' . $page_heading_bg . ';"'; } if ($page_heading_text != "") { $article_heading_text = 'style="color:' . $page_heading_text . ';"'; } } if (is_singular('post')) { $fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true); $page_design_style = sf_get_post_meta($post->ID, 'sf_page_design_style', true); if ($fw_media_display == "fw-media-title") { return; } } // Portfolio category navigation $enable_category_navigation = $sf_options['enable_category_navigation']; // Woo setup if ($shop_page) { $show_page_title = $sf_options['woo_show_page_heading']; $page_title_style = $sf_options['woo_page_heading_style']; $fancy_title_image = $sf_options['woo_page_heading_image']; $page_title_text_style = $sf_options['woo_page_heading_text_style']; if (isset($sf_options['woo_page_heading_text_align'])) { $page_title_text_align = $sf_options['woo_page_heading_text_align']; } if (isset($fancy_title_image) && isset($fancy_title_image['url'])) { $fancy_title_image_url = $fancy_title_image['url']; } if (is_product_category()) { $category = $wp_query->get_queried_object(); $hero_id = get_woocommerce_term_meta($category->term_id, 'hero_id', true); if ($hero_id != "" && $hero_id != 0) { $fancy_title_image_url = wp_get_attachment_url($hero_id, 'full'); } } } if (function_exists('is_product') && is_product()) { $product_layout = sf_get_post_meta($post->ID, 'sf_product_layout', true); if ($product_layout == "fw-split") { return; } } // Page Title if ($show_page_title == "") { $show_page_title = $default_show_page_heading; } if ($page_title == "") { $page_title = get_the_title(); } if ($page_title_height == "") { $page_title_height = apply_filters('sf_shop_fancy_page_height', 300); } // Fancy heading image if (($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") && $fancy_title_image_url == "") { foreach ($fancy_title_image as $detail_image) { if (isset($detail_image['url'])) { $fancy_title_image_url = $detail_image['url']; break; } } if (!$fancy_title_image) { $fancy_title_image = get_post_thumbnail_id(); $fancy_title_image_url = wp_get_attachment_url($fancy_title_image, 'full'); } } // Page Title Hidden if (!$show_page_title) { $page_heading_el_class = "page-heading-hidden"; } // Breadcrumb in heading if ($breadcrumb_in_heading) { $page_heading_el_class .= " page-heading-breadcrumbs"; } if ($page_title_style == "fancy-tabbed") { $page_title_text_align = "left"; } // Return if product & inner heading if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && ($page_title_style == "standard" || $page_title_style == "")) { return; } // Dont' allow fancy-tabbed on product pages if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") { $page_title_style = "fancy"; } if ($page_title_style == "fancy" && sf_theme_opts_name() == "sf_atelier_options" && !(function_exists('is_product') && is_product())) { $extra_styles = 'height: ' . $page_title_height . 'px;'; } if (isset($sf_options['minimal_checkout'])) { if (function_exists('is_checkout') && is_checkout()) { global $woocommerce; if ($sf_options['minimal_checkout']) { ?> <div class="minimal-checkout-return container"><a href="<?php echo esc_url($woocommerce->cart->get_cart_url()); ?> "><?php _e("Return to cart", "swiftframework"); ?> </a></div> <?php } } } if (!is_home()) { ?> <?php if ($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") { ?> <div class="fancy-heading-wrap <?php echo esc_attr($page_title_style); ?> -style"> <?php if ($fancy_title_image_url != "") { $bg_color_title = $bg_opacity_title = ""; if ($post) { $bg_color_title = sf_get_post_meta($post->ID, 'sf_bg_color_title', true); $bg_opacity_title = sf_get_post_meta($post->ID, 'sf_bg_opacity_title', true); } if (!$bg_color_title) { $bg_color_title = "transparent"; $bg_opacity_title = "0"; } ?> <div class="page-heading fancy-heading clearfix <?php echo esc_attr($page_title_text_style); ?> -style fancy-image <?php echo esc_attr($page_heading_el_class); ?> " style="background-image: url(<?php echo esc_url($fancy_title_image_url); ?> );<?php echo $extra_styles; ?> " data-height="<?php echo esc_attr($page_title_height); ?> "> <span class="media-overlay" style="background-color:<?php echo $bg_color_title; ?> ;opacity:<?php echo $bg_opacity_title / 100; ?> ;"></span> <?php } else { ?> <div class="page-heading fancy-heading <?php echo esc_attr($page_heading_el_class); ?> clearfix" data-height="<?php echo esc_attr($page_title_height); ?> " <?php echo $article_heading_bg; ?> > <?php } ?> <?php if ($page_title_style == "fancy" && $page_design_style == "hero-content-split") { sf_post_split_heading_buttons(); } ?> <?php if ($page_title_style == "fancy-tabbed") { ?> <div class="tabbed-heading-wrap"> <?php } ?> <div class="heading-text container" data-textalign="<?php echo esc_attr($page_title_text_align); ?> "> <?php if (sf_woocommerce_activated() && is_woocommerce()) { ?> <?php if (is_product()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php } else { ?> <h1 class="entry-title"><?php echo $page_title; ?> </h1> <?php } ?> <?php if ($page_subtitle) { ?> <h3><?php echo $page_subtitle; ?> </h3> <?php } ?> <?php if (!$remove_breadcrumbs && $breadcrumb_in_heading) { echo sf_breadcrumbs(true); } ?> <?php if (is_singular('portfolio') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <?php } ?> <?php if (is_singular('galleries') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, false, '', 'gallery-category'); ?> </div> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, false, '', 'gallery-category'); ?> </div> <?php } ?> </div> <?php if ($page_title_style == "fancy-tabbed") { ?> </div> <?php } ?> <?php if ($page_title_overlay_effect != "" && $page_title_overlay_effect != "none") { ?> <div class="sf-canvas-effect" data-type="<?php echo esc_attr($page_title_overlay_effect); ?> "> <canvas id="page-heading-canvas" data-canvas_id="page-heading-canvas"></canvas> </div> <?php } ?> </div> </div> <?php } else { ?> <?php if ($show_page_title == 2) { ?> <div class="page-heading ph-sort clearfix" <?php echo $article_heading_bg; ?> > <?php } else { ?> <div class="page-heading <?php echo esc_attr($page_heading_el_class); ?> clearfix" <?php echo $article_heading_bg; ?> > <?php } ?> <div class="container"> <div class="heading-text"> <?php if (sf_woocommerce_activated() && is_woocommerce()) { ?> <?php if (is_product()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php } else { if (is_search()) { ?> <?php $s = get_search_query(); $allsearch = new WP_Query("s={$s}&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; wp_reset_query(); ?> <?php if ($count == 1) { ?> <?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } else { ?> <?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } ?> <?php } else { if (is_category()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php single_cat_title(); ?> </h1> <?php } else { if (is_archive()) { ?> <?php /* If this is a tag archive */ if (is_tag()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Posts tagged with", "swiftframework"); ?> ‘<?php single_tag_title(); ?> ’</h1> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F jS, Y'); ?> </h1> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F, Y'); ?> </h1> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('Y'); ?> </h1> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <?php $author = get_userdata(get_query_var('author')); ?> <?php if (class_exists('ATCF_Campaigns')) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Projects by", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Author archive for", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } ?> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Blog Archives", "swiftframework"); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php post_type_archive_title(); ?> </h1> <?php } ?> <?php } else { if (is_404()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php _e("404", "swiftframework"); ?> </h1> <?php } else { if (is_home() && get_option('page_for_posts')) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo apply_filters('the_title', get_page(get_option('page_for_posts'))->post_title); ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } } } } } } ?> </div> <?php if (is_singular('portfolio') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <?php } ?> <?php if (is_singular('galleries') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, false, '', 'gallery-category'); ?> </div> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, false, '', 'gallery-category'); ?> </div> <?php } ?> <?php if (!$remove_breadcrumbs && $breadcrumb_in_heading) { echo sf_breadcrumbs(true); } ?> <?php if ($shop_page && sf_theme_supports('page-heading-woocommerce')) { woocommerce_catalog_ordering(); woocommerce_result_count(); } ?> </div> </div> <?php } } }
function kt_shop_top_control() { ?> <div class="shop-top"> <div class="shop-top-left"> <h1 class="shop-title"><?php woocommerce_page_title(); ?> </h1> </div> <div class="shop-top-right"> <?php woocommerce_result_count(); ?> <div class="orderby-wapper"> <?php woocommerce_catalog_ordering(); ?> </div> <?php kt_shop_view_more(); ?> </div> </div> <?php }
function custom_woocommerce_page_title($page_title) { $shop_products_layout = 'grid'; if (isset($_SESSION['shop_products_layout'])) { $shop_products_layout = $_SESSION['shop_products_layout']; } ?> <div class="display-product-option"> <ul> <li class="view-as-grid <?php if ($shop_products_layout == "grid") { echo esc_attr('selected'); } ?> "> <span><?php esc_html_e('grid', 'kutetheme'); ?> </span> </li> <li class="view-as-list <?php if ($shop_products_layout == "list") { echo esc_attr('selected'); } ?> "> <span><?php esc_html_e('list', 'kutetheme'); ?> </span> </li> </ul> <?php if (function_exists('woocommerce_catalog_ordering')) { woocommerce_catalog_ordering(); } if (function_exists('woocommerce_result_count')) { woocommerce_result_count(); } ?> </div> <?php ob_start(); ?> <span><?php echo esc_html($page_title); ?> </span> <?php $page_title = ob_get_contents(); ob_clean(); return $page_title; }
/** * * Rebuild page title */ function woo_page_title() { if (!is_singular('product')) { echo '<header class="site-page-header has-line clearfix">'; echo '<div class="entry-page-header">'; if (is_post_type_archive('product') || is_page(woocommerce_get_page_id('shop'))) { $title = twoot_get_frontend_func('meta', 'page_title', woocommerce_get_page_id('shop')); echo '<h1 class="entry-title">'; if ($title) { echo $title; } else { woocommerce_page_title(); } echo '</h1>'; } elseif (is_tax('product_cat') || is_tax('product_tag')) { echo '<h1 class="entry-title">'; woocommerce_page_title(); echo '</h1>'; } echo '<div class="entry-desc">'; woocommerce_result_count(); echo '</div>'; echo '</div>'; if (empty(get_post(woocommerce_get_page_id('shop'))->post_content) && (is_post_type_archive('product') || is_page(woocommerce_get_page_id('shop')))) { echo '<div class="catalog-ordering">'; woocommerce_catalog_ordering(); echo '</div>'; } elseif (is_tax('product_cat') || is_tax('product_tag')) { echo '<div class="catalog-ordering">'; woocommerce_catalog_ordering(); echo '</div>'; } echo '</header>'; } }
function avia_woocommerce_advanced_title() { global $wp_query; $titleClass = ""; $image = ""; if (!empty($attachment_id)) { $titleClass .= "title_container_image "; $image = wp_get_attachment_image($attachment_id, 'thumbnail', false, array('class' => 'category_thumb')); } echo "<div class='extralight-border title_container shop_title_container {$titleClass}'>"; //echo avia_breadcrumbs(); woocommerce_catalog_ordering(); echo $image; }
function kt_woocommerce_shop_loop() { ?> <div class="products-tools"> <?php kt_woocommerce_gridlist_toggle(); woocommerce_catalog_ordering(); woocommerce_result_count(); ?> </div> <?php }