-
AuthorPosts
-
April 18, 2019 at 9:31 pm #1092504
I updated my theme and woocommerce and for whatever reason, the product purchase button element is putting the name of the product next to the quantity label.
Can someone point me in the right direction to remove the product title from this label? Even if I have to edit the php… Thanks….
Cheers,
BCApril 19, 2019 at 5:25 am #1092558Hey smoke_house,
I took a look at your page and see that the “screen-reader-text” label is what is printing next to your quantity button.
This is for blind visitors to visit and use your site with the help of special browsers. You can read more about this here This css is recommend to hide the text from most visitors but allow the screen readers to still work.
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:#top #main .screen-reader-text { border:0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; width: 1px; overflow: hidden; position: absolute !important; word-wrap:normal !important; }
Best regards,
MikeMay 28, 2019 at 10:10 pm #1104976Hello,
I inserted that code however it removed the word “quantity” as well, which I need to keep.
Help. :-)
May 29, 2019 at 2:07 pm #1105157Hi,
Thank you, Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:#top.postid-4574 .av-woo-purchase-button .quantity label.screen-reader-text { margin-left: 30% !important; margin-right: 5% !important; }
and add this code to the end of your functions.php file in Appearance > Editor:
function custom_script(){ ?> <script> (function($){ $(document).ready(function(){ $('#top.postid-4574 .av-woo-purchase-button .quantity label.screen-reader-text').each(function() { var text = $(this).text(); $(this).text(text.replace('Candy Box subscription ', ' ')); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.