• Resolved michelehobson

    (@michelehobson)


    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.

    https://www.ads-software.com/extend/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Roy Ho

    (@splashingpixelscom)

    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.

    Thread Starter michelehobson

    (@michelehobson)

    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)

    Roy Ho

    (@splashingpixelscom)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What should the directory structure for functions.php in my child theme be?’ is closed to new replies.