I need help to remove clickable Link of Wordpress Site Logo from Woocommerce Single Product page. i tried following css code
.home .site-logo a { pointer-events: none; }
and it works for Homepage. But i need to avoid users going to home page when they come to woocommerce single product page.
I need help to remove clickable Link of Wordpress Site Logo from Woocommerce Single Product page. i tried following css code
.home .site-logo a { pointer-events: none; }
and it works for Homepage. But i need to avoid users going to home page when they come to woocommerce single product page.
Share Improve this question asked Dec 7, 2019 at 13:00 teqqqteqqq 33 bronze badges1 Answer
Reset to default 0Each product should have a unique class identifier in the body. Compare two product pages and depending on the theme you are using. Allot of them have a unique css identify.
Look for something like: postid- followed my numbers for example.
If you had something like:
<body class="product-template-default single single-product postid-3592 wp-custom-logo woocommerce woocommerce-page woocommerce-no-js shop-buttons-is-sticky">
Then you could target it using the postid-3592 class as its unique to that product page.
So you could do:
.postid-3592 .site-logo a { pointer-events: none !important; }
or for all products using a single product template you could use:
.single-product .site-logo a { pointer-events: none !important; }
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744930337a4601697.html
评论列表(0条)