Forums

Child themes and header/footer files (5 posts)

  1. cicakchanson
    Member
    Posted 4 months ago #

    I'm planning to create a child theme from the reactive design "skeleton" by simple themes. I'm rather new to child themes and I in looking at a few examples I've noticed that the header.php and footer.php files are not included. I've found some scripts on the net (like fittext) that I'd like to use but they want you to change either the header or the footer files in order to work. Can I just add a header.php and a footer.php file to my child theme and expect them to pre-empt the original header and footer files or am I stuck editing the original theme and redoing my changes when an update comes out?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Can I just add a header.php and a footer.php file to my child theme

    Yes. The child's template files are always used first with the fallback being the parent theme's files.

  3. cicakchanson
    Member
    Posted 4 months ago #

    Thanks esmi!

    Thats the answer I was hoping for. Is there anything special I need to do to reference the new header and footer files so that they pre-empt the old ones or is it enough to just make a copy of the header and footer files and place them in the child theme folder?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Is there anything special I need to do to reference the new header and footer files

    Nope. It's all automatic. The child's files always take precedence.

  5. cicakchanson
    Member
    Posted 4 months ago #

    excellent-

    Thanks again esmi!

Reply

You must log in to post.

About this Topic