Viewing 1 replies (of 1 total)
  • Thread Starter Valdinia

    (@valdinia)

    In the mean time I found a solution to add the Compare hyperlink under each product listed on the Product Category page (archive page):

    In my child-theme, in the functions.php file I added this:
    function vald_add_compare_button() {
    if ( function_exists(‘woo_add_compare_button’ ) ) echo woo_add_compare_button();
    }
    add_action( ‘woocommerce_after_shop_loop_item_title’, ‘vald_add_compare_button’ );

    The problem is that both the Compare link and the Compare button are displayed, so I added this style in my child-theme CSS:
    .woo_grid_compare_button_container {
    display:none;
    }

    I hope this is a correct solution. Probably not the best, but it works for me.

Viewing 1 replies (of 1 total)
  • The topic ‘Compare button added on category pages (archive pages)’ is closed to new replies.