• Hi there,

    I am trying to upload a child theme style sheet and am unsure exactly which files I need to upload to Blue Host from the parent theme along with the child style.css. my site is: https://www.theroastedroot.net (currently not working…) I’m using the delicacy template and want to change a lot of the colors, fonts, etc but like the way the page is structured. Essentially, I want everything from the delicacy theme but want to modify the style.css and various aspects of the header and footer. Please let me know what files I need in order to make a complete child theme.

    Thanks and hope you’re having a great weekend,

    Julia

Viewing 10 replies - 1 through 10 (of 10 total)
  • You need to upload the entire parent theme as if you were going to activate it. Then you need to upload a folder for your child theme with a minimum of a style.css with the following header:

    /*
    Theme Name: Your Custom Child theme
    THEME URI: https://yourthemessite.com
    Description: A totally rad child theme
    Author: Julia Mueller
    Template: parenttheme
    .
    */
    
    @import url('../parenttheme/style.css');

    Where parenttheme is the folder name of your parent theme. And the @import statement has the correct path to the styles you wish to import. If you are only changing a few colors, then you can probably important the full stylesheet. Otherwise, consider copying it into your child’s style.css and hacking away from there.

    Then activate your child theme… and change your colors in the child’s style.css.

    Thread Starter JuliaMueller

    (@juliamueller)

    Thanks a bunch for your help! I have no clue what I’m doing wrong but it still isn’t working. Are you able to see on your end what the problem is?

    Thanks!

    Julia

    The only file you must have in your child theme folder is style.css (which should only contain the content posted above). The child theme folder MUST be on the same directory level as the parent theme — so your directory should look something like this:

    site_root (www)
       wp-content
           themes (directory where all themes are)
               delicacy
               delicacy-child
                   style.css (blank except for above code)

    From your dashboard, you should then be able to see and activate the child theme. Now you can add to the new CSS file to customize your theme. And if you want to change other files, say header.php, put a copy of the parent header.php file in the child theme folder and then modify it there.

    Why is your site down? You won’t be able to do the child until the regular site is working…

    What WPyogi said. ?? Also, be sure to read the Codex on how to create a child theme:
    https://codex.www.ads-software.com/Child_Themes

    Thread Starter JuliaMueller

    (@juliamueller)

    Hi there,

    I’m not sure why my site is down…I figured it was because I tried activating my child theme and I must have put some incorrect code in there or something – would that cause the site to go down?

    I think it’s best if I don’t use the @import code because there are a great deal of changes I’m making to the theme. Here is the code I have at the top of my child style.css sheet
    /*
    Theme Name: Delicacy Child
    Theme URI: https://webtuts.pl/delicacy-en/
    Description: Child theme for the Delicacy theme
    Author: Julia Mueller
    Template: delicacy
    .
    */

    Then instead of the @import, I have the parent style css with my changes interweaved.

    Can you please let me know if this is the correct way of going about the child theme and please let me know what I can do to restore my site so that I can log in to my dashboard – since it is down, I can’t access my dashboard to see which theme to activate.

    Hope your weekend’s going well and thanks for the help!

    Julia

    Hopefully you have access via FTP. If so, I’d start with renaming your child theme’s folder to something else…. superchildtheme-backup. In theory this should break the theme, which should (Again, in theory) cause WP to revert to the default. I’m not really sure that you should be getting a 500 server error from a bad theme… usually that causes white screen of death. Try renaming your wp-content/plugins folder too.

    If that fails, you might have to reset the theme via the database.
    https://philb.co/howto/reset-your-wordpress-theme-using-phpmyadmin/

    Be very careful. As the tutorial says, if you don’t know what you are doing, stop and find someone who does.

    Thread Starter JuliaMueller

    (@juliamueller)

    I’ve tried renaming the child theme folder and I’ve even tried deleting the folder altogether and then re-creating it. I’ve also even tried deleting the original theme folder and re-uploading that too…It probably hasn’t helped the issue – all this deleting and re-uploading. I’ll follow the tutorial and see what happens. Did the rest of what I said before make sense (the code I showed you and using a full set of style code instead of the @import)? Thanks a bunch!

    Julia

    Don’t forget to rename the plugins folder. However, again, the 500 error is more unusual. You might need to talk to your hosts. If you have nothing to lose, they might be able to reset you.

    And yes your style.css’s header looks fine. As I said earlier it is perfectly fine (and probably faster loading) for you to copy your parent’s style.css into your child’s style.css. Though if delicacy updates and adds new markup/css you will miss out on that style and have to add it manually.

    Thread Starter JuliaMueller

    (@juliamueller)

    Thanks a bunch for all of your help. I contacted Blue Host and had them re-set everything back to the default. Thanks again!

    Sure thing. If you follow the instructions in this thread, you should be able to get your child theme going. Good luck.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Uploading Child Theme’ is closed to new replies.