Reputation: 61
I have a question in relation to having woocommerce products in a wordpress sidebar. I have included some products to an artist page in the side but the 'add to basket' buttons seem to overlap. Is there any way to hide these buttons in the sidemenu only?
Screenshot:
Link: http://zephyrusrecords.be/zephyrus/myrddin/
Thanks in advance and all the best, Michiel
Upvotes: 2
Views: 609
Reputation: 123
You can do this with CSS -- This is not the "RIGHT WAY" but it works.
aside#secondary #custom_html-40 a.add_to_cart_button{
display:none;
}
EDIT: If you don't know how to add the css. Log in to Dashboard > Appearance > Editor .. You should land on the styles.css editor, if not look for styles.css on the right sidebar. Load the page, and add it to the bottom of the page. To see the changes, make sure you clear your Cache when viewing page . Chrome: Shift+f5 ; Firefox: Ctrl+f5 (I usually clear the cache multiple times )
If you have knowledge of PHP, the right way to do this is creating a function, doing a $wp_query search limiting it to your specifications. This will shoot out the Product IDs. With this you can render pull the prod URL, Prod Thumb, Prod Pricing and any other information you wish to display. This method will take you time to develop, but is the right way to do it so you don't have additional code.
Good luck!
Upvotes: 1
Reputation: 46
It looks like this should do the trick, the id targets that specific widget so it should not affect anything else.
#custom_html-40 .button {
display: none;
}
Have a good weekend.
Upvotes: 2