Forum Replies Created
-
AuthorPosts
-
September 29, 2023 at 11:43 am in reply to: How to move category description text before products listings #44106cata78Support ExpiredThis reply has been marked as private.September 28, 2023 at 2:42 pm in reply to: How to move category description text before products listings #44104cata78Support ExpiredThis reply has been marked as private.September 27, 2023 at 9:59 pm in reply to: How to move category description text before products listings #44101cata78Support Expired
I added it in main theme functions.php and it moves only the title without description. Description disappeared.
cata78Support ExpiredWas a caching problem and i cleared the cookies. The code works perfectly.
cata78Support ExpiredThe code was already there. Still nothing happen.
The description from footer disapeared completely.
cata78Support ExpiredI changed the code with the one you give me and text disappeared from the footer and h1 moved back to header, which is the same this as i didn’t put any code.
cata78Support ExpiredHi,
I put the code below on functions.php and works good.
This code removed completely the h1 title and description from header and moved it on footer. Now i want to put another h1 title back on it’s place, but i want to be custom this time. I want to modify manually each h1 from header and give a different name, not the page name.
Also i want to have the option to modify meta title and meta description on each category/subcategory.
Thanks in advance!
Please change code to
add_action( 'wp_head', 'remove_my_action' ); function remove_my_action(){ remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 ); } function jas_claue_child_wc_page_head() { remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); $output = '
'; echo wp_kses_post( $output ); } add_action( 'woocommerce_before_main_content', 'jas_claue_child_wc_page_head', 15 ); function jas_claue_child_wc_description() { 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 = ''; $output .= '<p class="mg__0"> </p>'; $output .= ''; echo wp_kses_post( $output ); } add_action( 'woocommerce_after_shop_loop', 'jas_claue_child_wc_description', 40 );'; if ( is_search() ) { $output .= '<h1 class="mb__5 cd">' . sprintf(__( 'Search Results for: %s', 'claue' ), '<span>' . get_search_query() . '</span>' ) . '</h1>'; } elseif ( is_shop() ) { $output .= '<h1 class="mb__5 cd">' . 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="cd">' . single_cat_title( '', false ) . '</h1>'; $output .= do_shortcode( category_description() ); //add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 40 ); //add_action( 'woocommerce_after_shop_loop', 'woocommerce_product_archive_description', 40 ); } ob_start(); $output .= ob_get_clean(); $output .= ' -
AuthorPosts