Can I target a css class for only one URL on my wordpress site?
.class a {pointer-events:auto;}
.class a[href="URL"]{pointer-events: none;}
This isn't working, is there another way?
Can I do this with javascript?
I need to disable the Add to cart button for a page with a sample part (something that shouldn't be added to cart).
The only other unique attribute is data-product_id="32570"
is there a way to target data-product_id="32570" in css?
pointer-eventsand that people may view your site with CSS disabled, you might want to consider a different solution, such as a conditional in your server side code.aelement is exactly the same asa[href="URL"]? You can also changehref=tohref*=, so it can match toaelements which have theURLon thehrefbut it doesn't have to be exactly. Perhaps you missing somehttp://www.. Your code should work.