This topic has 6 replies, 2 voices, and was last updated 9 years by sashv13.

  • Author
  • #91618
     sashv13
    Participant

    Hi,

    I would like to remove Tags and Categories from the quick view and product page.

    How do I go about not showing these two things? While file do I need to edit to achieve this?

     

    Thanks for your help

    Attachments:
    You must be logged in to view attached files.
    #91636
     sharmstr
    Moderator

    Put this in your child theme’s functions.php file.

    COPY CODE
    
    add_action( 'after_setup_theme', 'remove_product_meta' );
    function remove_product_meta() {
        remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    }
    

    Woo has been known to change the priority of their actions and filters, so after an update if this no longer works, look for the add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 ) in /woocommerce/includes/wc-template-hooks.php and see if they changed ’40’ to another priority (number).

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #91750
     sashv13
    Participant

    Thats Great! thank you It removed it from products page

    However, it’s still appearing in the quick view. How do I remove it from quick view?

    #91772
     sharmstr
    Moderator

    Try this instead

    COPY CODE
    
    add_action( 'after_setup_theme', 'remove_product_meta' );
    function remove_product_meta() {
        remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
        remove_action( 'woocommerce_single_product_modal_summary', 'woocommerce_template_single_meta', 40 );
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #91808
     sashv13
    Participant

    That did not work unfortunately

    Also, I checked /woocommerce/includes/wc-template-hooks.php
    woocommerce_single_product_modal_summary is not there

    There is only woocommerce_single_product_summary. This is why the code you provided worked for the product page but its not working for quick view

    #91809
     sharmstr
    Moderator

    You wont find it in wc-template-hooks.php because its a Kleo hook, not a woo hook. Its called in /kleo/lib/plugin-woocommerce/config.php.

    In any case, it works fine for me. Try changing after_setup_theme to init.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #91822
     sashv13
    Participant

    init worked

    Thank you!!!!!!!!!!!!

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?