Aleš Sýkora / November 15, 2022 / 2 comments

WooCommerce: Change Shop (product archive) title and description

Post summary: When you are using Oxygen builder dynamic data and creating simple e-shop, you may want to create one template for your shop and your categories. There are many challenges like displaying all product categories and subcategories and more. One of them is displaying the archive title and description dynamically. If you use Oxygen’s dynamic data…

When you are using Oxygen builder dynamic data and creating simple e-shop, you may want to create one template for your shop and your categories.

There are many challenges like displaying all product categories and subcategories and more. One of them is displaying the archive title and description dynamically.

If you use Oxygen’s dynamic data > Archive Title and Archive Description, you will end with generic title “Shop” on the shop Archive page. And you will probably want to change them.

Here is how you can to that with custom code snippets of functions.php. You can try both of them, each one should be working.

<?php
//Change the shop Title and Description
add_filter( 'woocommerce_show_page_title', 'as_change_wc_archive_title' );
 
function as_change_wc_archive_title( $title ) {
if ( is_shop() ) $title = "New shop title";
return $title;
}
/**
 * Filter to Change WooCommerce Page Title.
 */
add_filter( 'woocommerce_page_title', 'new_woocommerce_page_title' );

function new_woocommerce_page_title( $page_title ) {
	if ( $page_title == 'Shop' ) {
		return 'New Shop Title'; // Add your title here.
	}
}

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

2 comments

  • Is it possible to change the “Product” title on an archive?
    eg here:
    justbecooking.com/shop

    It says “Products” but we’d love to change that to “Culture Boxes”….

  • A

    You mean the one in the Woocommerce products module?

Share Your Thoughts