WooCommerce Responsive Text

Hi,

How can I change the WooCommerce page titles for the my-account, orders, addresses and account-details pages to use responsive text?

Most my other pages use responsive text and it would be great to match.

CSS or editing a template file is fine.

Thanks

Brad

Hello Brad,

Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// Make all the WooCommerce Titles responsive
// =============================================================================
function responsive_woo_titles() {
	if( x_is_shop() || x_is_product() || x_is_product_category() || is_product_tag() || is_cart() || is_checkout() || is_account_page() ) {
		echo do_shortcode( '[responsive_text selector=".woocommerce .entry-title" compression="1.5" min_size="20px" max_size="90px"]' );
	}
  
}
add_action('wp_footer', 'responsive_woo_titles');
// =============================================================================

Feel free to adjust the compression, minimum size and maximum size in the code above.

1 Like

Thanks @RueNel,

Sorry for the slow reply. For whatever reason I wasn’t notified of any reply to the thread.

I’ll test it out shortly and report back.

Thanks

Brad

Let us know how it goes.

Hey @RueNel & @Prasant,

It worked perfectly!!! Excellent support as always.

Thanks

Brad

Glad to hear that. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.