Child theme: php strings substitutions

  • maria cap

    #1617

    Hello,

    i’ve been playing for a while (weeks) on wordpress and graphene, before getting on this forum and reading about the child theme.

    now, i want to get all my modifications in the child theme, and reload a default unmodified graphene, as i don’t want to miss any updates.

    I don’t think i’m gonna have any issue regarding css, as i read about this and it’s easy to setup.

    Anyway, it’s not clear to me how do i bring to the child theme modifications made to the php code!

    Ex. line 1071, functions.php (orig):

    Code:
    <p id=”tweetfollow” class=”sidebar_ablock”>“><?php _e(‘Follow me on Twitter’, ‘graphene’) ?></p>

    Ex. line 1071, functions.php (mine)

    Code:
    <p id=”tweetfollow” class=”sidebar_ablock”>“><?php _e(‘Seguimi su Twitter’, ‘graphene’) ?></p>

    how do i bring such a php modification to my child theme?

    thanks in advance!

    Marco

    Mod

    Kenneth John Odle

    #16552

    The easiest way may be to make your current installation of graphene into a child theme, and then install a clean copy of Graphene. Rename the “graphene” folder in the “themes” folder to “graphene-child” (or whatever you wish), make the appropriate changes to the styles.css file, and then install a clean copy of graphene.

    Of course, you will end up with copies of all the original theme files, but if you have made modifications you have forgotten about, you won’t lose any of them. However, when a new update of Graphene becomes available, you may not have all of its new functionality available to you, because they are being overridden by your child theme.

    If you have only made a few modifications, and you are sure that you can remember them, then just create a new folder called “graphene-child” (or whatever you wish), and copy over those files that you have changed. You can then copy over a fresh copy of Graphene into the original “graphene” folder, or wait for a new update.

    You will want to do this using an FTP client.

    Ken

    marcolongoni

    #16553

    So, if i need to modify one line of a php file (or if i need to remove one) i can just put the whole modified file in the child folder.

    If i need to add a function, i can just put the new function to an empty functions.php file in the child folder.

    I made a few mods, but can’t remember all. I will have to diff the two folders (orig and mod) in bash to get the modifications out of the theme.

    In the child folder, there’s no need to keep the files that are equal to the orig folder.

    Is everything right?

    does this apply to images folder too?

    ty

    Marco

    Mod

    Kenneth John Odle

    #16554

    So, if i need to modify one line of a php file (or if i need to remove one) i can just put the whole modified file in the child folder.

    I believe so. (But it’s been a while since I’ve created a child theme.)

    If i need to add a function, i can just put the new function to an empty functions.php file in the child folder.

    Yes.

    In the child folder, there’s no need to keep the files that are equal to the orig folder.

    True.

    does this apply to images folder too?

    I believe so, yes.

    Ken

    Admin

    Syahir Hakim

    #16555

    This page in the theme’s (work in progress) wiki should explain better about child theme: http://wiki.khairul-syahir.com/graphene-theme/wiki/Customisation_using_a_child_theme

    Mod

    Kenneth John Odle

    #16556

    Yes, please read that link. I was completely mistaken about this.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!