• Hello.

    I’m having a bit of confusion how to customize a wordpress website.

    Everytime the author updates the site, I lose what I customized. So whats the best way…

    For example, if I wanted to edit the footer, Do I have to drag a copy of footer.php into the child theme? And then in then in the child theme’s style.css, edit the code from there?

Viewing 4 replies - 1 through 4 (of 4 total)
  • For example, if I wanted to edit the footer, Do I have to drag a copy of footer.php into the child theme? And then in then in the child theme’s style.css, edit the code from there?

    You can make CSS changes to the footer from the Child Theme’s stylesheet without copying footer.php. You only need to copy the template file if you’re also maodifying the template.

    • This reply was modified 8 years, 6 months ago by Jacob Peattie.

    You need to create a child-theme in order to make any edits to the code.
    https://codex.wordpress.org/Child_Themes

    The child-theme consists of a style.css file and a functions.php file.
    Changes to the parent-theme’s css are made in child-theme’s style.css this file will “override” the parent theme.

    If you want to make changes to the actual template files, yes you would COPY the template file footer.php and paste it into the child-theme directory and make the edits to that duplicate of the parent file. Changes will override the parent template file.

    Thread Starter jwwhitley09

    (@jwwhitley09)

    Thanks!

    How about if I wanted to edit the file in my theme:

    wp-content/themes/seoengine/template-parts/header-1.php

    and did not want want edits overwritten on next update.

    If I put a copy of header-1.php into the child theme, edit it there, it should be safe from the next update? Do I have to add the main header file in the child theme as well (are they dependent) ?

    Only place the template files you are changing in the child-theme all other files will pull from the parent theme.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Child Theme Edit question’ is closed to new replies.