• I am using a Themetrust Filtered Theme. I have tried their support forum. The Parent theme has major customizing (2 yrs ago so I have forgotten what I altered), later I made a Child theme and did more customizing. Before I upload all my projects, I need to fix this. I have read a lot of posts on your knowledgebase, understanding that I need to compare my Parent file customizations with a DEFAULT theme.
    (1) I don’t know how to get the default theme, I’ve asked and not received a response. I assume I’ve already customized the copy I bought.
    (2) I read on one of your posts (now can’t find it) that you compare both versions of php and css codes on a plain text editor, ok. Then the post said to “4) upload (ftp) the new functions.php to your child theme folder.” Why do I have to use an ftp upload? Can’t I just copy/paste? Thank you SO much. LMF.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    (1) I don’t know how to get the default theme, I’ve asked and not received a response. I assume I’ve already customized the copy I bought.

    You’ll probably have to wait until an update does come out before you can create a Child Theme easily. An update will contain a new copy of every file – however please note I’m talking from experience on www.remarpro.com. I can’t say how other systems are done.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    (2) I read on one of your posts (now can’t find it) that you compare both versions of php and css codes on a plain text editor, ok. Then the post said to “4) upload (ftp) the new functions.php to your child theme folder.” Why do I have to use an ftp upload? Can’t I just copy/paste? Thank you SO much. LMF.

    Don’t do that with the functions.php file. People often do that and break their websites because PHP doesn’t let you redeclare functions by default. If you redeclare a function in your Child Theme that’s already used in the parent theme then your site will throw a PHP error.

    You don’t have to use FTP, that is just a suggestion.

    Thread Starter lmfeltner

    (@lmfeltner)

    Good Morning, and thank you.
    1. They might not update the theme, it hasn’t been updated in 2+ years. I did find that I could download a “clean” copy of my ThemeTrust WordPress Theme. Then discovered if I uploaded it to my Dashboard it dawned on me that I might accidentaly “update” my Parent Theme, rather than just put another copy on the Dashboard so I could go in and compare a clean version with what I may have altered at one time. It says it won’t update unless I tell it to, but I’m scared to try. LMF.

    if I uploaded it to my Dashboard it dawned on me that I might accidentaly “update” my Parent Theme

    Correct! Do not do that! Do your file comparisons locally, and I do that with Notepad++ where you can use the Notepad++ “Compare” plugin to see the two files side-by-side with differences highlighted.
    https://www.google.com/search?q=notepad%2B%2B

    edit: Overall, it sounds to me like you have quite a project ahead of you and would do well to use Xampp or whatever to run WordPress locally while you sort things related to your theme.

    Thread Starter lmfeltner

    (@lmfeltner)

    2. Also on the previous post by someone I cannot find, it mentioned a method of “freezing” the parent file. That’s not a proper description. It was an alternative to finding and copying all the files. I didn’t read it carefully, alas.
    I simply must get this site up and running, so I should just stop worrying about straightening out these Parent/Child issues, and just load all my projects and then never update the parent file. This is extremely pressing. Very best,LMF.

    One thing you *might* be able to do is to rename a copy of the fresh download of that theme and then use that as a new Parent while developing a new Child Theme just for it. However, I would guess the theme authors have guarded that theme against that.

    Thread Starter lmfeltner

    (@lmfeltner)

    lejosepho, thank you. I am on a MAC, and have started using Text Wrangler that has a “compare” feature. I am so inexperienced with these things! I just found I could open the php files without viewing through the WP Dashboard! By unzipping the theme (on the computer), I can view the php files. BUT, Do Not Pass Go Monitor, said don’t do it. Don’t compare and alter the functions.php. So I don’t know what to do now.

    Thread Starter lmfeltner

    (@lmfeltner)

    Are there step-by-step instructions on the Codex that shows how to do the transfer of code to the Child php files, and then how to erase the changes from the parent file. I’ve been reading tons of Parent/Child topics, it seems to be a very common question. Thanks! LMF

    Do Not Pass Go Monitor, said don’t…compare and alter the functions.php.

    Functions.php is *one* file (and possibly not the only) that is exclusive in the sense that the Child version does not over-ride the Parent version. You can typically copy a file such as page.php to a Child Theme and then the Parent’s copy will be ignored, but that does not happen with functions.php. So, you will have some careful work to do if you have modified the parent file, and that is one you *should* check against the original…and then do whatever you must to make changes work via the Child file.

    Are there step-by-step instructions on the Codex that shows how to do the transfer of code to the Child php files, and then how to erase the changes from the parent file.

    Not specifically for what you need to do. Rather, the Codex will only show what either can or cannot be done when making a Child functions.php.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    There are not going to be instructions on how to do theme-specific modifications on the Codex Child Theme article.

    General advice:
    If it’s a template file then just copy and paste that file into your Child Theme folder.

    Thread Starter lmfeltner

    (@lmfeltner)

    Thank you, WHICH file is “that file”?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The template file that you’ve modified.

    Thread Starter lmfeltner

    (@lmfeltner)

    Forgive me, I’m just not comprehending. From the other knowledgebase inquiries, I gathered that one has to compare the “inside files” or the style.css, functions.php, index.php and home.php files. So I am now not sure what you mean by copying/pasting the whole template file that I’ve modified. Is it that simple? Copy/Paste all these individual files listed above, in their respective windows, and make sure that the Child theme style modifications are ABOVE the Parents? That would be just too simple, so I must be not understanding. thanks for bearing with me. LMF

    Try looking at things from the other direction. If you want to customize a theme, you make a Child Theme where you can begin with nothing more than style.css even without adding any custom coding (CSS) at first. In your case, you already have style.css changes in two places: Parent and Child. So, you will need to activate a default copy of the Parent Theme, then compare your modified style.css from the modified Parent and copy changes into your new style.css in your new Child Theme running alongside the default copy of the Parent Theme…and then “rinse and repeat” with the style.css from your previous Child Theme.

    In the case of a file such as page.php, same deal. With a new Child Theme running alongside a default copy of the Parent, compare whatever previous page.php file or files you have to the default page.php, then copy a default page.php into your new Child Theme and add you changes there.

    Thread Starter lmfeltner

    (@lmfeltner)

    Thank you for your explanation.
    1. I don’t know how to activate the Default Theme without wiping out the modified Parent theme. I don’t think I can rename the default.
    2. I don’t know how to have two themes (parent, child or default) “running alongside” each other. I can only view one at at time in the WP Dashboard.
    3. I did check some of the PHP files in a text editor and they were identical. It looks like I altered the only CSS files in the parent.
    4. the rest makes sense, thank you. LMF

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Parent theme and Child theme transferring customized code’ is closed to new replies.