Button Additions and Removals

Good afternoon,

I would love to accomplish two things:

  1. Hide the “Select to Compare” button on any/all individual product listings selected from the “Condo Intel” page, such as : https://denverhighriseliving.com/condominium/lakehouse/. Like this: https://prnt.sc/k3j4od. The issue is that the code can’t hide the same “Select to Compare” buttons from https://denverhighriseliving.com/condo-intel/.
  2. On the shop page https://denverhighriseliving.com/condo-intel/, is there a way to add a button next to the existing “Add to Cart” button that says “VIEW REPORT” and links to the product, just like clicking on the title does? I am not sure if it is very intuitive that the title can be clicked on.

Thank you,
J

Hi There,

For #1, please try adding this custom CSS:

.post-type-archive-product p.woocommerce-products-compare-compare-button {
    display: none;
}

For #2, please add the following code under functions.php file locates in your child theme:

function wc_shop_demo_button() {
    echo '<a class="button product_type_simple add_to_cart_button" style="" href="'.get_permalink().'" target="_blank">View Report</a>';
}
add_action( 'woocommerce_after_shop_loop_item', 'wc_shop_demo_button', 20 );

Hope it helps :slight_smile:

Thank you for your fast response! The button was added, but could you help me style it a little? I would like to reduce the font size to 14 px, make it uppercase, and add 2.5px letter spacing. Is there a way to then float the button up to right next to the 'Add to Cart" button?

Hello There,

I am not seeing the button.

Did you happen to removed it? Please put it back so that we can check if it is possible to move the button to the right of the “Add to cart” button.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.