function woocommerce_category_archive_description() { if (is_tax(array('product_cat', 'product_tag')) && get_query_var('paged') == 0) { $description = wc_format_content(term_description()); $image = false; if (is_tax() || is_tag() || is_category()) { $term = get_queried_object(); $thumbnail_id = absint(get_woocommerce_term_meta($term->term_id, 'thumbnail_id', true)); if ($thumbnail_id) { $image = wp_get_attachment_image($thumbnail_id, 250); } else { $image = wc_placeholder_img_src(); } } if ($description) { $string = '<div class="row margin-bottom">'; if ($image) { $string .= '<div class="col-sm-4 col-sm-push-8">' . $image . '</div>'; } $string .= '<div class="term-description col-sm-8'; if ($image) { $string .= ' col-sm-pull-4'; } $string .= '">' . $description . '</div></div>'; echo $string; } } }
/** * Show a shop page description on product archives. * * @subpackage Archives */ function woocommerce_product_archive_description() { if (is_post_type_archive('product') && 0 === absint(get_query_var('paged'))) { $shop_page = get_post(wc_get_page_id('shop')); if ($shop_page) { $description = wc_format_content($shop_page->post_content); if ($description) { echo '<div class="page-description">' . $description . '</div>'; } } } }
function custom_product_archive_description() { global $makeclean_theme_option; if (is_post_type_archive('product') && get_query_var('paged') == 0) { $shop_page = get_post(wc_get_page_id('shop')); if ($shop_page) { $description = wc_format_content($shop_page->post_content); if ($description) { echo '<div class="page-description col-md-9 col-sm-8">' . $description . '</div> '; } } } }
/** * Show a shop page description on product archives. * * @subpackage Archives */ function woocommerce_product_archive_description() { // Don't display the description on search results page if (is_search()) { return; } if (is_post_type_archive('product') && 0 === absint(get_query_var('paged'))) { $shop_page = get_post(wc_get_page_id('shop')); if ($shop_page) { $description = wc_format_content($shop_page->post_content); if ($description) { echo '<div class="page-description">' . $description . '</div>'; } } } }
echo wp_get_attachment_url(get_post_thumbnail_id($shop_page->ID)); ?> ');"> <div class="seven columns"> </div> <div class="five columns entry-content"> <header class="entry-header"> <h3 class="cl-white entry-title"><?php echo get_the_title($shop_page->ID); ?> </h3> </header><!-- .entry-header --> <?php echo wc_format_content($shop_page->post_content); ?> </div> <?php wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', 'waterfront'), 'after' => '</div>')); ?> </div><!-- .entry-content --> </section> <section class="wrapper wave-border"> <div class="row"> <div class="ten columns centered text-center"> <h3>Woody's Waterfront Online Gear</h3> <p>Here you can purchase watever it is we decide to sell online -- it's great!</p> </div> </div>
<a href="<?php echo esc_url($category_link); ?> " class="product-category__image"><?php echo adventure_tours_render_category_thumbnail($category); ?> </a> <div class="product-category__content"> <?php printf('<h3 class="product-category__title"><a href="%s">%s</a></h3>', esc_url($category_link), esc_html($category->name)); ?> <?php if ($category->description) { ?> <div class="product-category__description"><?php echo wc_format_content($category->description); ?> </div> <?php } ?> </div> <div class="product-category__info"> <?php if ($category->count > 0) { ?> <div class="product-category__info__item"><?php echo esc_html($category->count . ' ' . _n('tour', 'tours', $category->count, 'adventure-tours')); ?> </div> <?php
$cat_term = is_tax() ? get_queried_object() : null; $display_mode = AtTourHelper::get_tour_archive_page_display_mode($cat_term ? $cat_term->term_id : 0); ?> <?php ob_start(); ?> <?php if ($is_first_page) { if ($cat_term) { echo wc_format_content($cat_term->description); } elseif (is_archive()) { $tours_page_id = adventure_tours_get_option('tours_page'); $tours_page = $tours_page_id ? get_post($tours_page_id) : null; if ($tours_page && $tours_page->post_content) { echo wc_format_content($tours_page->post_content); } } } ?> <?php if (have_posts()) { ?> <?php $need_show_categories = $is_first_page && in_array($display_mode, array('both', 'subcategories')); $need_show_tours = in_array($display_mode, array('products', 'both')); $tours_display_style = $need_show_tours ? apply_filters('adventure_tours_get_tours_page_display_style', adventure_tours_get_option('tours_archive_display_style')) : ''; ?>
/** * Overrides the default woocommerce_taxonomy_archive_description() function */ function woocommerce_taxonomy_archive_description() { if (is_tax(array('product_cat', 'product_tag')) && get_query_var('paged') == 0) { global $wp_query; $term = $wp_query->get_queried_object(); $thumbnail_id = get_woocommerce_term_meta($term->term_id, 'thumbnail_id', true); $image = wp_get_attachment_url($thumbnail_id); $image_class = $image ? ' has-term-image' : null; $description = wc_format_content(term_description()); if ($description) { echo '<div class="term-description' . $image_class . '">' . $description . '</div>'; } } }