• Hellllppppp!!!!!!

    I’m lost.

    How do I go about making a heavily modified parent theme into a child theme?

    I’ve been working with WP 3.0, twentyten theme. Did a bunch of mods to different files (I’m not a techie in the least but have figured out a few things and tweaked here and there). Recently read about the suggestion to work with a child theme in order to not lose mods.

    So I backed up/saved all the files from WP 3.0 twentyten theme and upgraded to WP 3.3 which comes with the TwentyEleven theme and would like to use the previously modified parent theme as a child theme to override the updated version. I’ve read about putting the info in the header for the child theme to reference the parent theme however I’m lost. I’ve made changes to the CSS stylesheet, and a quite a few other files How do I get everything that was working together in the previous parent theme (which I want to convert into a child theme) to take effect with the upgrade?

    Let me pre-empt WP veterans first-I’m rather a dunce with coding and terminology so I’d appreciate any and all help to be explained in the most basic of terms. Step by step direction are most appreciated.

    Right now my website is down because of the aforementioned and I’d like to get it up and running with the quickness.

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter ssguy69

    (@ssguy69)

    I’m thinking it should be moved out of the Themes folder.

    Thread Starter ssguy69

    (@ssguy69)

    Was able to move things around a bit and this is the message received after going into Admin panel and attempting to activate the child theme:

    Fatal error: Cannot redeclare twentyten_page_menu_args() (previously declared in /home/content/93/7359893/html/wp-content/themes/twentyten Child/functions.php:221) in /home/content/93/7359893/html/wp-content/themes/twentyten/functions.php on line 224

    So I’m thinking that because the child theme’s function php file gets loaded before the parent’s function php file, there’s something duplicate going on. After reading the Codex it seems so type of correction is need.

    But to which file? Parent or Child?

    1. The child theme’s must have a unique name
    2. You cannot just turn a copy of a parent into a child. Review child themes.

    You can download a basic Twenty Ten child theme from here.

    Thread Starter ssguy69

    (@ssguy69)

    1) Child theme does have a unique name: Twenty ten Child
    2) I understand the concept behind child themes

    I need assistance in resolving the following message that appears when I attempt to activate the child theme:
    Fatal error: Cannot redeclare twentyten_page_menu_args() (previously declared in /home/content/93/7359893/html/wp-content/themes/twentyten Child/functions.php:221) in /home/content/93/7359893/html/wp-content/themes/twentyten/functions.php on line 224

    Helllllllppp!!!!

    I need assistance in resolving the following message that appears when I attempt to activate the child theme:

    That means you’re declaring – i.e. defining two functions with the same name.

    I’m assuming the likely cause is that you have copied/pasted all (or part) of Twenty Ten’s functions.php file into your Twenty Ten Child’s functions.php?

    At the very least, you have function twentyten_page_menu_args() {} in both files, which is the cause of this specific error.

    Thread Starter ssguy69

    (@ssguy69)

    Thanks Chip,

    I do have it in both files.

    How do I resolve it? Do I remove one of them from the themes and if so which theme?

    Remove it from the Child Theme.

    Don’t put anything in the Child Theme that you don’t intend to modify from its original state in the Parent Theme. Most likely, your Child Theme’s functions.php file should be empty (and if so, it doesn’t even need to exist at all).

    As for overriding Theme functions: you can only redeclare pluggable functions from the Parent Theme: that is, functions in the Parent Theme that are wrapped in a if ( ! function_exists() {} ) conditional. Or, if they are provided, you can use custom filters.

    If none of this makes any sense, you probably shouldn’t be messing with functions.php to begin with.

    Thread Starter ssguy69

    (@ssguy69)

    Still plugging away.

    Would appreciate if someone could provide instructions on the file directory hierarchy.

    I have the ‘plugins’ folder inside my child theme folder but something tells me it doesn’t belong there. Problem as well is that with the update came a parent theme plugin folder.

    Anyone have a few minutes to helping me sort out the mess I’ve created?

    Oh boy!
    That’s how your directory should look like:

    wp-content includes the following folders:

    • languages
    • plugins
    • themes
    • upgrade
    • uploads
    • index.php

    your themes folder contains only the themes and child-themes.

    Also if you create a child-theme and a style.css for it, you have to include the refering theme’s style.css file in the new style sheet:

    @import url(“../twentyten/style.css”);

    Hope it helps.

    Kabi

    Thread Starter ssguy69

    (@ssguy69)

    Thanks Kabi.

    Still trying to figure out where to place the child theme’s plugin folder in relation to the parent theme’s plugin folder.

    There’s no separate plugin for each theme. Plugins are installed into the “wp-content/plugins” directory. It’s a global settings, if that’s the right use of word. Please guys correct me if I’m wrong. πŸ™‚

    @ssguy69:

    Since you posted a separate topic for the Child Theme/Plugin issue, let’s try to keep discussion of it there, so that others can more easily find the question and answers.

    Thread Starter ssguy69

    (@ssguy69)

    So I have figured that I’ll move the plugin folder that was previously present prior to the upgrade to wp-content/plugins and delete the new plugin folder that came with the recent upgrade.

    Am I on the right track here?

    Thread Starter ssguy69

    (@ssguy69)

    Went into the FTP client to try and move everything into place and still not making much progress. This child theme thing is great in principle but definitely another monster in execution.

    A premium theme has been proposed that is supposedly easier to work with.

    I’m throwing in the towel and think I’ll start anew.

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Convert modified parent theme into child theme’ is closed to new replies.