Skip to content
Advertisement

Show product titles to specific delimiter on WooCommerce category archive pages

My products have titles that include the delimiter | after which I enter some SEO keywords.

Example product title Samsung UE55AU7172 | Smart 4K UHD 55

Can I force WooCommerce to show the product titles up to that delimiter in product category pages only?

For example, the above product title in the product category page would be Samsung UE55AU7172.

Advertisement

Answer

You can use the woocommerce_shop_loop_item_title action hook to edit the title on a product category archive page.

So you get:

JavaScript

OR use this to apply it on WooCommerce archive / shop / cat pages.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement