TUTORIAL: How & Why Use Child Theme?

  • Ali
    May 16, 2015 at 12:14 pm #106

    Creating a child theme ensures that your custom changes are preserved on the next update. Unless the file you edited gets a big update in a future version, you will no longer have to ever re-do your changes when using a Child Theme.

    Read more on WordPress Codex.

    Yo can download our standard child theme for BetterMag from HERE.

    …or Here’s how to do it for BetterMag:

    1. Create a new folder in wp-content/themes/. Name it anything – we’ll use better-mag-child in this how-to.

    2. Browse to this new folder, and create a style.css file. Paste the following code:

    Modify the details as needed.

    3. Go to Appearance > Themes and activate your newly created child theme. In this example, it will be named “BetterMag Child”.

    4. You may have to re-assign your main menu. Go to Appearance > Menus > Manage Locations and re-assign your “Main Menu” to “Main Navigation”.

    3. Now you can overwrite theme files with your custom changed ones. Let’s say you wanted to change the HTML structure of footer.php, you would copy the footer.php from better-mag to better-mag-child, and edit as you wish.

    That’s all.

    Attachments:
    You must be logged in to view attached files.
Viewing 1 post (of 1 total)

You must be logged in to reply to this ticket.

Comments are closed.