Check your HTML body
classes in a rendered page – you should find that Woocommerce inserts classes when you’re on a shop page, so you shouldn’t need any custom PHP, just some CSS:
eg, to style something with the class myfabdropdown
on all normal pages:
body .myfabdropdown { background-color: white; }
and then to style the same element just on Woocommerce pages:
body.woocommerce .myfabdropdown { background-color: yellow; }
Related Posts:
- WooCommerce: How to edit the get_price_html
- Get woocommerce product price by id [closed]
- Woocommerce: How to remove page-title at the home/shop page but not category pages
- Hidden woocommerce products still showing up in search results [closed]
- Preventing WooCommerce email sending only on particular conditions
- Woocommerce view order link in customer emails
- Filter on a custom product attribute in WooCommerce using meta_query or tax_query [closed]
- Woocommerce : How to attach an custom attachment with customer-processing-order.php email template [closed]
- Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO?
- Does the woocommerce_order_status_changed hook fire when WooCommerce updates an order status automatically? [closed]
- Display WooCommerce only in stock sizes product attribute on shop page
- Remove “Choose An Option” on Product Variation & Auto Select Instead
- check if current url/page equals checkout page [closed]
- Mini cart in header using divi is not getting updated on changing the cart items count:
- Woocommerce Product Price Inserted programmatically doesn’t get displayed In Single Product Page
- How to Order by random on a SQL query
- Move add to cart in Woocommerce
- Separate Categories from WC Product loop when display type is set to both on the category
- Remove Order List Row Link in WooCommerce Admin?
- How do I hide out of stock products from homepage but not from catalog?
- Woocommerce order processing email subject not changing
- Different translations for the same plugin inside a multisite
- Woocommerce multiple taxes with same rates adds as different values.
- function to add note on single Woo Commerce product page for downloadable variations
- Apply Additional Discount after coupon
- Is it possible to add a sidebar to Storefront’s Welcome page
- Woocommerce Porto Theme Hide Selected Categroy for Breadcrumbs
- Set specific number of columns for top level term on product category archives
- invalid menu item when upgrading to WordPress 5.5
- Register a new user on wooCommerce using Rest API
- Woocommerce custom search
- How to be able to edit custom address fields in WooCommerce admin?
- Make a Read More toggle in the_content on single-product in Woocoomerce
- WooCommerce Base Page Featured Image Custom Theme
- Adding extra email address who receives email like admin – woocommerce
- Is it possible to merge Woocommerce attributes? [closed]
- How can i create a custom product search?
- *Woocommerce* Past Orders Disappeared after changing Stripe Account [closed]
- Need help in handling woocommerce api timeout issue [closed]
- create custom layout product list woocommerce [closed]
- How to search variable product by its variation id in woocommerce admin product search box?
- Add shipping address to Woocommerce order emails [closed]
- A function to add arguments to a taxonomy
- Hide inventory message on product page based on available stock quantity
- Different Templates for Woocommerce Parent and Child Sub Categories
- add sub subpage endpoint to woocommerce plugin my-account section
- Clients with empty username are not receiving request new password email
- how can i add an additional action into woocommerce admin order page through my plugin?
- Woocommerce changing add to cart button text as icon [closed]
- how to change the “return to shop” button text? [closed]
- Problem while adding the variable product woocommerce
- Remove sale signs from site in branded? [closed]
- Create a regular post for every WooCommerce order
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- customers are not showing up in woocommerce
- Hooks For Design variation in woo commerce single product page
- Dokan stock management
- Access custom meta_data in processing order email
- Woocommerce : How to automatically input the same email for every order?
- Woocommerce – Change order of products in Confirmed Order
- echo product parent category
- How to edit wc_get_template_part for archive products
- Switch to user link shortcode
- Woocommerce – how to round up all prices to end in .99
- Display WooCommerce product attribute on shop page
- How to get product category ID based on post?
- Jump to Footer On Scroll – Woocommerce Pages Phones Only
- WordPress Development Workflow
- Woocommerce redirection product_name -> product_cat/product_name
- Remove Stripe Woocommerce Credit Card Icons (and replace with image)
- How to add external product url to woocommerce from a metadata by function.php
- Unable to call woocommerce hook in my custom php file
- Custom account page that accepts a query parameter
- Custom WooCommerce template for product
- Checkout fr Woocommerce – load default WooCommerce checkout template on the fly
- Loop Through Current Woocommerce Product Categories Sub Categories
- Two types of product categories on shop page
- Remove username and account password field from checkout page
- How to send an invoice with details to the customers
- How to send an automatic email to a custom field in Woocommerce order meta 2 weeks after a product is bought
- Woocommerce cart table too wide [closed]
- HTTP Error when uploading pictures and problem with the size of images
- add_rewrite_rule() returns 404 page
- Custom changes performed on WP + WooCom site on maintenance subdomain. How to perform a migration to a main domain?
- Woocommerce Setup not completing
- WooCommerce – Adding Product Attributes to CSV Export
- Unable to enocde the result of wc_get_products
- Woocommerce Add to Cart function
- WooCommerce – doesn’t show product when using woocommerce.php [closed]
- Remove Span Class From Woocommerce Price
- How to show woocommerce login / registration form in modal
- Notice: Trying to get property of non-object in bodycenter [closed]
- WooCommerce remove billing detail completly
- unable to get product by category only getting product added lastly
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- How do I remove the recurring total from thank you for your order email?
- I want to Display custom woocomerce meta box in orders list
- Detect Product Type with code
- Verify if woocommerce supports this design [closed]
- Hook for Woocommerce checkout fields