Hide product title and categories on product page

How could I hide product title and categories on a single product page in WooCommerce:
enter image description here

I know I can edit/comment the source code but then I have to manually do it after each update. Is there a function I can add to theme functions.php that can remove product title and categories from single product page?

Related posts

Leave a Reply

2 comments

  1. For compatibility with future updates of your theme and plugins, I’ve found a better way to do this is through WooCommerce hooks. To remove both the title and the meta-data items from your Single Product Page, you should put the following two lines in your theme’s main functions.php:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    

    You can find more info about changing, or re-ordering your Product Page Contents in this post.

  2. Simplest Solution is go to woocommerce plugin /templates/single-product/title.php and remove content of this file.

    Same process can be done by removing content of meta file in same directory.