No products in the cart.
Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
-
December 18, 2023 at 11:53 am in reply to: Woocommerce: How to move the Category H1 Tag above the description? #9910
alex
ParticipantYou can go 2 ways here.
Solution 1 (hooks):
Show before main content and after the breadcrumbsadd_action('woocommerce_before_main_content', 'show_category_title', 40, 2); function show_category_title() { $cat_title = single_tag_title("", false); echo '<h1>' . $cat_title . '</h1>'; }
Solution 2 (PHP templates overwrite):
- Copy archive-product.php from
/wp-content/plugins/woocommerce/templates
to/wp-content/YOUR_THEME/woocommerce
- Edit with custom code. Example:
<header class="woocommerce-products-header col-span-12"> <h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1> <?php do_action( 'woocommerce_archive_description' ); ?> </header>
- Copy archive-product.php from
- AuthorPosts
Viewing 1 post (of 1 total)