Tuesday, November 15, 2022
The Great Tit
Updated: 15. 11. 2022, Added: 15. 11. 2022

WooCommerce: Change Shop (product archive) title and description

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.
	}
}
Did I help you? Fuel our WordPress journey
Beep this article to your friends!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 comments on “WooCommerce: Change Shop (product archive) title and description”

  1. 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"....

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram