Hello Henry:
I found this code below, but not sure if it will work. I want to move the category description to above the footer and below the products. The instructions says to add code to “claue-child>functions.php” …not sure where to find that. I sent this message to you before, but I never got it to work.
I had another coder add 2 new text sections to below the top banner and above the footer. But if I can move the ‘category description’ to above the footer, then I probably won’t use the bottom text section.
Can you check if this code below is correct, or do you have something else? thanks, Tom.
<h3>Please add more code to claue-child > functions.php</h3>
—————————————————————————————————————————–
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 = ‘
‘;
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>’;
//$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 .= ‘
‘;
echo wp_kses_post( $output );
}
add_action( ‘woocommerce_before_main_content’, ‘jas_claue_child_wc_page_head’, 15 );
—————————————————————————————————————
and add below code to claue-child > style.css
.term-description {
display: block;
width: 100%;
max-width: 1170px;
margin: 30px auto;
}
————————————————————————————————————–
<h3>Please add more code to claue > functions.php above the code for step 2</h3>
/* move category description below products */
add_action( ‘wp_head’, ‘remove_my_action’ );
function remove_my_action(){
remove_action( ‘woocommerce_before_main_content’, ‘jas_claue_wc_page_head’, 15 );
}