WooCommerce - excelling eCommerce
[resolved] What should the directory structure for functions.php in my child theme be? (4 posts)

  1. michelehobson
    Posted 2 years ago #

    I have been unable to locate the directory that my custom functions.php file should reside. I've tried: child-theme/woocommerce/functions.php, child-theme/woocommerce/single-product/functions.php, child-theme/functions.php, child-theme/woocommerce/templates/functions.php. You get my point? Nothing works. I've tried using various hooks:

    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_title', 5 );?>
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);

    . Nothing works.

    I'm using woocommerce 2.0.3 with twenty-twelve theme. I would sure appreciate an answer that works, because I've run across 100+ that haven't.


  2. Roy Ho
    Posted 2 years ago #

    If I am understanding you correctly then the functions.php file is always in the root of the active theme. So it doesn't matter if it is a parent theme or a child theme. If you want to apply your own hooks, you put it in the functions.php of your active theme folder root.

  3. michelehobson
    Posted 2 years ago #

    Are you referring to child-theme/functions.php? If so, I have it there and it still doesn't work. Should I have a link or anything in the functions.php file besides the 3 hooks I have in it? (I deleted one)

  4. Roy Ho
    Posted 2 years ago #

    Then you're asking the wrong question. You already have it in the correct place so the question shouldn't be where the functions.php should be but instead why the hooks you're using isn't working. I suggest you closed this topic and open a new one with a proper title.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic