Ecommerce Shopify WordPress Discussion

Adding CSS class to navigation element dynamically in WooCommerce

I have a WooCommerce site with the following Products permalink structure: /products/shop/ The client wants a custom "Product" page rather than the default generated one. The challenge is that the actual product pages don't trigger the navigation product link to have an active state. I can't make it have the same active orange background color as the non WooCommerce pages within that group of pages. Do you have any ideas on dynamically adding a class to the menu item when a product page is viewed so I can style the navigation element? Link to development site: https://wordpress-1164757-4160273.cloudwaysapps.com/products/ https://wordpress-1164757-4160273.cloudwaysapps.com/products/shop/bp-protease-003-1000/
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.