WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Turning a customized theme into a child theme? (5 posts)

  1. lifeskope
    Member
    Posted 1 year ago #

    Hi I'm all confused! lol!

    I may not explain this well lol but I'm going to try my best.

    * I'm completely new to the incredible world of wordpress.

    * I built a site lifeskope.com/blog in html and used this guide "how to integrate wordpress into an existing site" and this one "Integrate WordPress Into Existing Site Tutorial" to customize the twentyeleven theme and turn my site design into a blog.

    I love how it's working so far. It seems to be doing everything I want, but I've since been made aware that because it's build on a tweaked duplicate copy of the twentyeleven theme directly and not on a "child theme" that it's in potential danger of being null and void when the next wp update get's released?? ... so I have some questions on how I can go about making it a child theme and still keep my customized design?...

    I've been reading up on "child themes" and watching some how to videos etc and I feel like what I did was close to creating a child theme but yet it isn't, and I'd like to make it properly off the child theme but I'm getting confused as to how...

    Originally what i did...

    (Following the above mentioned guides)

    First I made a complete and duplicate copy of the existing "twentyeleven" theme folder and renamed the copy folder to a custom title.

    I then opened up the Style.css file of the theme folder I was customizing and changed the theme name and description,
    deleted all the CSS that was in the doc and replaced it with my website's CSS and saved it.

    (I've now since learned that for a child theme I was supposed to made a new EMPTY folder and EMPTY style sheet and put in a twentyeleven style sheet call action instead of making a completely independent duplicate copy? :/)

    Then I took and opened all the vital Header, Index, Footer, Single, Archives, 404, etc docs and copied over pieces of my html sites code into each one below the beginning php call and deleted the rest of the code except the special script calls which i put into the content sections of my html code.

    (Again these being the independent duplicate docs in the theme folder that I was customizing. Leaving the original twentyeleven folder entirely alone.)

    ... It works great, so far exactly as I want it, but I don't want all my hard work over ridden if this was the wrong way to do it :/?

    In trying to correct my potential mistake; I put in the correct style call action into my customized style style sheet and it's ok for the most part except it made my menu and a few other small items go askew.
    I think I can fix it if I keep tweaking it but is this all I have to do to make it a "child theme"?

    What about the customized Header, Index, footer, single, 404, search, archives etc docs?

    Ug i'm soo confused! Any help would be appreciated! thanks :)

  2. W.P. Ginfo
    Member
    Posted 1 year ago #

    Hi,

    Let me summarize the 'regular' way of doing this. And perhaps help you along in making the transition.

    !!NOTE!!
    ALWAYS Make a backup of your site, before making any changes!!

    1. Use FTP to backup the files.
    2. Make sure to also backup your database.
    3. Use a childtheme to make the changes in:
      Don't make any changes to a theme itself. Instead make the changes to a childtheme. Should the author of your original theme update the theme, your changes will not be overwritten. Your site with your adaptations will remain intact.
      Suggestion: use the 'one click childtheme plugin'. This stops you from making syntax-errors when creating a childtheme.
    4. Installed the childtheme? Now activate it.
      Check if things look 'normal' = like the parent theme.
    5. Use FTP to access the files of your site and it's childtheme.
    6. Use NOTEPAD++ or proper EDITOR [not wordprosessor] to edit css and php.
    7. To make the changes in the CHILDtheme:
      - copy original php files / css-file(s) of the original theme [as required] to the childtheme directory and edit them as required.

    == == ==
    Making the transition...

    Once again... make a back-up, this time of the childtheme.

    One by one make the changes and check the result after each step.

    1. copy and paste the css-code you changed into the style.css of the new childtheme. NOTE: Leave the top of the style.css and it's link to the original theme intact!
    2. To make [further] adaptations...

    3. copy the ORIGINAL php-files you plan to adapt / you adapted from the ORIGINAL THEME to the childtheme directory
    4. copy and paste your adaptations
      into the php-files of the childtheme

    If that is all you changed, you should have a 'regular', working childtheme... and a site that looks and works as planned.

  3. lifeskope
    Member
    Posted 1 year ago #

    Hi :), thanks for your help, that sounds like what i did though i think?

    So if I understand it right... the only real difference between what I did & have now and what i need to do to convert it into a child theme; is the style sheet call inside the style sheet that calls upon the original? Yes? no? maybe? am I close?

    Thanks! and definitely will look into the one click plugin :)

  4. lifeskope
    Member
    Posted 1 year ago #

    Ok so I just read this wordpress article on child themes.

    And I think I understand better. I see that the stylesheet call I've been referring to (called @import) is NOT necessary. Only the "Template" line is in the customized style sheet.

    Very cool. I've still got a lot to learn :).

  5. W.P. Ginfo
    Member
    Posted 1 year ago #

    Well, it's a complex thing... webdesign... ;-)
    Fun though.

Topic Closed

This topic has been closed to new replies.

About this Topic