Showing posts with label category. Show all posts
Showing posts with label category. Show all posts

Thursday, June 27, 2024

Display Category Description on First Page only Woocommerce

 add_action( 'wp', function() {
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ( 1 !== $page ) {
        remove_action( 'woocommerce_archive_description', 'shoptimizer_woocommerce_taxonomy_archive_description' );
        remove_action( 'woocommerce_archive_description', 'shoptimizer_category_image', 20 );
        // If you also want to remove the "Below category content" area:
        remove_action( 'woocommerce_after_shop_loop', 'shoptimizer_product_cat_display_details_meta', 40 );
    };
}, 20 );

Thursday, April 4, 2024

How to allow Html Tags in category description area.

 foreach ( array( 'pre_term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_filter_kses' );
}
 
foreach ( array( 'term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_kses_data' );
}

For Professional website contact WEB CODE ADDICT

View this post on Instagram A post shared by WebCodeAddict (@webcodeaddicted)