Forums

[resolved] Child theme confusion. Other files than style.css (3 posts)

  1. aleq
    Member
    Posted 10 months ago #

    Hey

    I use Twenty Eleven theme and I've made a child theme for it.
    My main confusion comes from the fact that I often need to do some things to alter the look of the website and often I need to edit stuff in files other than style.css
    For instance I saw in several topics that changes must be done to index.php (to remove post-title and "posted on.." text) but how do I do this according to my child theme? Should I make a new index.php in my themes/twentyelevel_child and will it overrule the settings from the main Twenty Eleven theme?

    Can anyone please explain a little how it works? I tried reading the article on how to create child theme, but I have read so much info now that I am getting headache. I need someone to explain it to me in a simple manner.

    Thanks in advance.

  2. Amy Hendrix (sabreuse)
    Moderator
    Posted 10 months ago #

    Should I make a new index.php in my themes/twentyelevel_child and will it overrule the settings from the main Twenty Eleven theme?

    This, exactly. The general rules are:

    1) For styles and functions, both the child and parent versions will be loaded -- that way, you can add just the function or style declaration you want without copying the whole thing.

    2) For all the other php files (index, header, footer, etc), your child version will replace the original. So you'll want to copy over the entire index.php and make your changes in the new copy.

  3. aleq
    Member
    Posted 10 months ago #

    Awesome. Thanks for clearing this up :)

Reply

You must log in to post.

About this Topic

Tags

No tags yet.