Skip Navigation

[Resolved] Can the woocommerce button on the search results share the same styling as the button on the product page?

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1180646

Hi Luo,

I'm trying to determine why the "Add the cart" button on the following page: hidden link

is not the same as the "Add to Cart" button on the following product pages hidden link

Can the woocommerce button on the search results share the same styling as the button on the product page?

#1180649

Hello,

I assume we are talking about [wpv-woo-buy-or-select] in a post view, this shortcode will output a HTML a link tag, for example:

<a href="..." class="button product_type_simple add_to_cart_button ajax_add_to_cart single_add_to_cart_button button alt" ... >Add to cart</a>

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-buy-or-select

But in single product post, the "Add to cart" HTML codes is using different button HTML codes, for example:

<button type="submit" name="add-to-cart" value="16051" class="single_add_to_cart_button button alt">Add to cart</button>

So they do not share the same styles by default.

In your case, you can try to style the HTML A link tags manually, for example:

a.add_to_cart_button{
/* here put your custom CSS codes */
}