Skip to content

Instantly share code, notes, and snippets.

@ruhul24
ruhul24 / custom-title.php
Created June 21, 2023 04:40
Function to customize the title of the WooCommerce Product Archives based on the category
<?php
function custom_woocommerce_page_title($page_title) {
if (is_product_category()) {
$category = single_term_title('', false); // Get the category name
$page_title = "Here are '$category'";
}
return $page_title;
}
add_filter('woocommerce_page_title', 'custom_woocommerce_page_title');
@ruhul24
ruhul24 / website-speed-test-with-api.md
Last active June 21, 2023 04:23
How to test website speed with google pagespeed api