Support » Plugins and Hacks » WooCommerce » [Resolved] Woocommerce template overriding isn't working in my Child theme

[Resolved] Woocommerce template overriding isn't working in my Child theme

  • Michael


    Hello Woocommerce Forum folks.

    I’m trying to override a woocommerce template in my child theme, and I’m following the recommendation in http://wcdocs.woothemes.com/codex/template-structure/ to the letter.

    That said, it isn’t working — when I jump to the woocommerce my-account page while not being logged in, I get the usual Sign-In / Register page (as expected). However, it keeps pulling form-login.php from the plugin directory, and not from my child theme directory.

    Here’s how it’s set-up:

    (1) Woocommerce login template is in:
    wp-content -> plugins -> woocommerce -> templates -> myaccount -> form-login.php

    (2) Woo Theme “Whitelight” is installed in:
    wp-content -> themes -> whitelight

    (3) My child-theme for the Whitelight theme is installed here (and works just fine):
    wp-content -> themes -> whitelight-dalluva-child

    (4) I have copied form-login.php in (1) above into my child theme directory, as follows:
    wp-content -> themes -> whitelight-dalluva-child -> woocommerce -> templates -> myaccount -> form-login.php

    When I load the login/register page, I know it’s pulling from (1) because I can edit that original template file and see the results in the display.

    I must have something basic missing, but I’m following the Woo recommended procedure for overriding a template file (as in http://wcdocs.woothemes.com/codex/template-structure/).

    Anyone see something obvious I’m missing?

    Many thanks in advance.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Remove the /template/ from your structure. So it becomes:

    wp-content -> themes -> whitelight-dalluva-child -> woocommerce -> myaccount -> form-login.php



    Damn, can’t believe I didn’t see that! Magdor is right, the ‘template’ folder is just to tell you to put its contents into your own template. Just remove that level and you’ll be fine!



    That was it! I knew it had to be something simple. Thanks @magador!




    Closing this one out. Thanks!



    One more time…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Woocommerce template overriding isn't working in my Child theme’ is closed to new replies.
Skip to toolbar