• Resolved best_before

    (@best_before)


    I’ve been asked to make some changes to a site; I’m not the original creator. The theme is a modified version of Storefront but it’s not a child theme and the basic Storefront theme is not present. I don’t know the history but it seems that the original builder hasn’t been involved for a while so there’s no ‘normal’ way to update the theme and there are quite a few woo templates within the theme which need to be updated. I’m figuring all that out but is there a way to make this easier in future?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Child theme is best way. In some case using ‘hooks’ to modify stuff like checkout page message or similar also useful, putting the code in custom plugin that won’t die with core or theme updates.

    @best_before been in that situation myself and there’s no easy solution!

    If the only files that have been modified are the WooCommerce templates then you could install the Storefront theme and create a child theme and use that for the modifications – use a file compare program like https://winmerge.org/ to go through and try and determine which changes are modifications and which are the results of the theme updates!

    Even doing that makes site maintenance more difficult as you’ll have to keep an eye on the Storefront updates and update your child theme versions accordingly.

    The suggestion above about hooks and custom code is, I think the best option. You can use a plugin like Code Snippets to add these without affecting the them itself

    Thread Starter best_before

    (@best_before)

    Thanks, @neotrope & @seank123. I’ve created a Child theme from the modified Storefront and installed ‘vanilla’ Storefront. Making progress – not sure yet how to convince the Child that the unmodified Storefront is its parent but I think that winmerge app will help.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @best_before

    Creating a child theme from the modified Storefront and installing the vanilla Storefront is a great step. To make the child theme recognize the unmodified Storefront as its parent, you need to specify this in the child theme’s style.css file. In the header of this file, there should be a Template line like this: Template: storefront

    This tells WordPress that your child theme is a child of the Storefront theme.

    Detailed information on creating a Storefront child theme can be found here: https://woocommerce.com/document/set-up-and-use-a-child-theme/#section-4

    I hope this helps, and please don’t hesitate to ask if you have any further questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Future-proofing a modified theme’ is closed to new replies.