• Question please.

    I have a child theme and have placed my stylesheet and make changes there…

    But i also made changes to functions.php and header.php etc. (i do have copies of these on my hdd should anything go wrong. but my question is after making changes to any php file… do i place it back in the child theme folder? is this the correct way to do it?

    thank-you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Lesley2013

    (@lesley2013)

    just trying to understand the structure so please be patient with my questions. I’ve been reading so much that instead of making sense it just shambled my brain!

    Thread Starter Lesley2013

    (@lesley2013)

    oh i posted in the wrong section! should of posted in troubleshooting 🙁 anyway of moving it please.

    thank-you.

    Really doesn’t matter which forum – for .php files EXCEPT functions.php, yes, put the changed version in the child theme folder.

    For functions.php see:

    http://codex.wordpress.org/Child_Themes#Using_functions.php

    Parent files should not be modified at all.

    after making changes to any php file… do i place it back in the child theme folder?

    with header.php and template files – yes.

    with functions.php – no;
    functions.php in the child theme should only contain changes made via pluggable functions, filters, actions, etc – but not a copy of the functions.php from the parent theme.

    http://codex.wordpress.org/Child_Themes
    http://codex.wordpress.org/Child_Themes#Using_functions.php

    what directly are you trying to change via functions.php?
    what theme are you working with?

    Thread Starter Lesley2013

    (@lesley2013)

    ok i’m going to have a read…. thank-you.

    I’ve placed
    header.php
    functions.php
    footer.php
    home.php
    styles.php

    inside the child theme i’m using.

    Thread Starter Lesley2013

    (@lesley2013)

    I should of mentioned the theme in the title, my apologies.

    The theme i’m using is twentytwelve but i’ve also uploaded
    Twenty Twelve Dark – because i needed the dark b/ground.

    dev site is dev site

    original site is my sitewhich is currently re-directed to weebly. (i was hosting my own website but i made some jquery changes and stuffed it right up so deleted it) hence the weebly.

    with functions.php – no;
    functions.php in the child theme should only contain changes made via pluggable functions, filters, actions, etc – but not a copy of the functions.php from the parent theme

    mmmm, i haven’t made changes to it yet…. but the theme came with a functions.php file so i just left it there.

    the change i need to make is adding a couple of divs and ul to the header so i can display my media icons at the very top of the site. ‘this is according to a youtube tutorial i found’

    thank-you.

    Thread Starter Lesley2013

    (@lesley2013)

    [twenty-twelve-dark] theme comes with footer.php functions.php and style.css

    Thread Starter Lesley2013

    (@lesley2013)

    ohhh i think i understand what you are saying….

    basically functions.php which sits in the [theme folder i’m using] basically only has ‘specific’ functions added. So therefore the main functions.php would be unaffected.

    is that right? sorry this is all quite new to me, but kind of starting to grasp it.

    Thread Starter Lesley2013

    (@lesley2013)

    same with the stylesheet. Main stylesheet sits in the main theme. however copy is in the child theme whereby i can change and have the original file unaffected.

    basically functions.php which sits in the [theme folder i’m using] basically only has ‘specific’ functions added. So therefore the main functions.php would be unaffected.

    I see, Twenty Twelve Dark is your child theme, which might already have some adjustments in a functions.php; that is correct.

    Main stylesheet sits in the main theme. however copy is in the child theme whereby i can change and have the original file unaffected.

    also correct –
    style.css of the child theme has some new or corrective CSS; to further change any formatting of your site, add more styles into that style.css in a way that these are adding new styles or are overwriting the existing styles.

    Thread Starter Lesley2013

    (@lesley2013)

    oh thank-you for confirming… now i feel a tad confident that i’m on the right track. 🙂

    I got a bit confused because after reading some of the documents which tell you that if you want to change styles etc. its best practice to name the ‘copy’ stylesheet -child however when i downloaded this dark theme it didn’t show that so i got all confused as to what was what and how it works.

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

The topic ‘When making changes to functions.php’ is closed to new replies.