[resolved] Woocommerce template overriding isn't working in my Child theme (6 posts)

  1. Michael
    Posted 3 years ago #

    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.


  2. magdor
    Posted 3 years ago #

    Remove the /template/ from your structure. So it becomes:

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

  3. travellers
    Posted 3 years ago #

    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!

  4. Michael
    Posted 3 years ago #

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


  5. Michael
    Posted 3 years ago #

    Closing this one out. Thanks!

  6. Michael
    Posted 3 years ago #

    One more time...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic