Home › Forums › Themes Support › Claue › I meet some trable with category taxonomy description bug
- This topic has 7 replies, 2 voices, and was last updated 5 years, 5 months ago by Harry.
-
AuthorPosts
-
-
December 3, 2018 at 1:07 am #27282
It seems there some bug at category description view.
On my website it looks like that: https://maryflame.com/product-category/skin-care/body/mary-kay-moisturizer/
-
December 3, 2018 at 11:23 am #27285
Hi,
Your category description text so long, i recommend move text under product loop by add below code to claue-child > functions.php
function remove_shop_heading() { remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } add_action('wp_head', 'remove_shop_heading'); function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; //$output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . ' '; } else { // Remove old position of category description remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 10 ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 3, 2018 at 8:40 pm #27295
I have tried but have no changes at all.
I think correctly should be like this: https://www.izidress.com/product-category/prom/high-low-prom-dresses/
Usually, the category description used as a single page content.
Have any ideas to realize it in this theme?
-
December 3, 2018 at 10:15 pm #27300
please change code to
function remove_shop_heading() { remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } add_action('wp_head', 'remove_shop_heading'); function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; //$output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>'; } else { // Remove old position of category description //remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; //add_action( 'woocommerce_before_shop_loop', 'woocommerce_taxonomy_archive_description', 10 ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
and add more code to Claue > Theme Option > General Layout > Custom CSS
.term-description { display: block; width: 100%; max-width: 1170px; margin: 30px auto; }
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 3, 2018 at 11:18 pm #27305
Thanks. This is a bit like that.
But how can I display the description in the products area?Check Attached file, please.
Attachments:
You must be logged in to view attached files. -
December 4, 2018 at 12:56 am #27308
Hi,
1 Please change prev code to
function remove_shop_heading() { remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } add_action('wp_head', 'remove_shop_heading'); function jas_claue_child_wc_page_head() { if ( ! cs_get_option( 'wc-enable-page-title' ) || ( class_exists( 'WCV_Vendors' ) && WCV_Vendors::is_vendor_page() ) ) return; $title = cs_get_option( 'wc-page-title' ); $output = '<div class="page-head pr tc"><div class="jas-container pr">'; if ( is_search() ) { $output .= '<h1 class="mb__5 cw">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cw">' . esc_html( cs_get_option( 'wc-page-title' ) ) . '</h1>'; //$output .= '<p class="mg__0">' . do_shortcode( cs_get_option( 'wc-page-desc' ) ) . '</p>'; } else { // Remove old position of category description //do_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output .= '<h1 class="cw">' . single_cat_title( '', false ) . '</h1>'; //add_action( 'woocommerce_before_shop_loop', 'woocommerce_taxonomy_archive_description', 10 ); } ob_start(); $output .= ob_get_clean(); $output .= '</div></div>'; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 );
2. And change CSS code to
.term-description { display: block; width: 100%; max-width: 1170px; margin: 30px auto 0; }
3. Download attach file, extract to claue-child > woocommerce (you need create new folder woocommerce in claue-child)
Regards
Attachments:
You must be logged in to view attached files.Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 4, 2018 at 3:31 am #27313
It seems works well,
Thank you very match! Nice theme!
-
December 4, 2018 at 10:22 am #27319
You’re welcome.
Could you help me give our theme 5 stars rating and good review at https://themeforest.net/downloads
Thanks so much and have a great day!
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.