Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #275562

    Hi guys,

    I’m using Woocommerce for a client who wants to use it only as a catalogue – purchasing is not to be enabled.

    I’ve used the “WooCommerce Catalog Visibility Options” plug-in to successfully remove the ‘Add to cart’ from the product view page. However, it does not affect products displayed on category listing pages.

    Can you point me to the file that contains the code that produces the buttons there so I can remove it?

    Many thanks,

    Andrew

    #275590

    Hi thewebworkshop!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .archive .avia_cart_buttons {
    display: none!important;
    }

    Best regards,
    Yigit

    #275643

    Hi Yigit,

    Thanks for the reply. I know that a CSS workaround would stop it being displayed on the page when it is displayed as normal. However, the code for it would still be in the HTML and disabling the CSS would make the link visible. I know it’s pretty unlikely that many users will do this, but it still needs to be factored in. Screen readers would also ‘see’ the link.

    Can you point me to the file that deals with the link? :)

    Many thanks, Yigit.

    Andrew

    #275651

    Hey!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(".archive .avia_cart_buttons").remove();
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Best regards,
    Yigit

    #275687

    Brilliant. That’s done the trick!

    Thanks for your help. Much appreciated.

    #275690

    Hi!

    You are welcome Andrew, glad we could help! Let us know if you have any other questions or issues

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Woocommerce: Remove "Add to cart" & "Show Details" buttons from category page’ is closed to new replies.