title: Remove link to single page from Woocommerce product page
body: <p>I have been trying to remove the link to the single product page of the Woocommerce plugin. On this forum many people asking questions about it and have read most of them. But nearly all of these questions are old. However as far as I understand now I have to use the functions.php and content-page.php to achieve this. </p>
  
  <p>So after reading all the info on the i-net I came up with this code in the functions.php (which is inside my child theme folder)</p>
  
  <pre><code>if ( !function_exists('add_remove_hooks')):
  function add_remove_hooks() {
      remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
      remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
      }
  endif;
  add_action( 'init', 'add_remove_hooks' );
  </code></pre>
  
  <p>I have tried all kind of variants like only put in the remove_action rows, not wrapt in a function or use an other action in the add_action function, but none of them seem to work. The syntax, however, is as it should be.</p>
  
  <p>The (part of)content-page.php looks like</p>
  
  <pre><code>&lt;li &lt;?php post_class( $classes ); ?&gt;&gt;
      &lt;?php do_action( 'woocommerce_before_shop_loop_item' ); ?&gt;
  
          &lt;?php
              /**
               * woocommerce_before_shop_loop_item_title hook
               *
               * @hooked woocommerce_show_product_loop_sale_flash - 10
               * @hooked woocommerce_template_loop_product_thumbnail - 10
               */
              do_action( 'woocommerce_before_shop_loop_item_title' ); ?&gt;
  
          &lt;?php if($product_style == 'classic') { 
              do_action( 'woocommerce_shop_loop_item_title' );
              do_action( 'woocommerce_after_shop_loop_item_title' ); 
          } ?&gt;
  
      &lt;?php do_action( 'woocommerce_after_shop_loop_item' ); ?&gt;
  
  &lt;/li&gt;
  </code></pre>
  
  <p>I don't know how to debug in PHP, but I know the files are "used" by WP because if I change something in one of these files I see it on screen. However, the links are still in place. The remove_action is not working.</p>
  
  <p>Does anyobody have another suggestion on how to accomplish this? Of what to look for?</p>
  
  <p>Used WP 5.2 and Woocommerce 3.0</p>
  
  <p>UPDATE:</p>
  
  <p>Thanks to Alfaraz I was able to solve the problem. Putting the remove_actions in the functions.php of the child theme now also works. I didn't realize I also had to set the active theme in WP to my Child theme. That did the trick in the end.</p>