WordPress.org

Forums

Creating a child theme (14 posts)

  1. Dot
    Member
    Posted 3 years ago #

    Hello
    I am still trying to create a child theme for twenty eleven in Word Press 3; I have saved
    /*
    Theme Name:
    Description:
    Author:
    Version: 1.0
    Template:

    @import url("../twentyeleven/style.css");

    all as style.css, and thought I had created a directory (just a new folder?): wp-content/themes/twentyeleven-child into which I placed the above file, but when I go to my admin panel (http://deardot.com/wp-admin/index.php)I'm told that there is an error, the theme folder does not exist or is empty - and nothing is showing up in appearances/manage themes (literally; not even the twenty twelve header)
    Diane

  2. keesiemeijer
    moderator
    Posted 3 years ago #

    Read: http://codex.wordpress.org/Child_Themes

    I think "Theme Name" and "Template" are required values. try it with this in style.css:

    /*
    Theme Name:     Twenty Eleven Child
    Template:       twentyeleven
    */
    
    @import url("../twentyeleven/style.css");

    You can also download a basic child theme for twentyeleven here: http://quirm.net/themes/twenty-eleven-child/

  3. Dot
    Member
    Posted 3 years ago #

    Hello
    I have tried downloading that theme - it's sitting in content/themes - but that isn't showing up either?!
    I've also tired adapting what I've put into CSS and what it's called :/
    Diane

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    the theme folder does not exist or is empty

    See what's in your themes folder (wp-content/themes) by using FTP or whatever file management application your host provides.

    Is twenty eleven activated when you visit the front end of your website?

  5. Digital Raindrops
    Member
    Posted 3 years ago #

    Hi Diane,
    Are you using FTP or Uploading from Admin Appearance?

    The child theme you downloaded, if you are using FTP you need to unzip the file, often the extracted folder has a second folder with the theme!

    You would FTP the folder that has style.css in it.
    The folder should have no spaces so /my-child-theme/ and not /My Child Theme/

    If your website is multi-site this has to be activated from 'Network Admin' before the sub-sites can see it.

    Last thing that people forget is to activate the child theme.

    I created my first online Prezi Presentation yesterday, wrote a post about it, my first Prezi presentation was a How-to for creating a Child Theme, it is embedded in the post, if you get stuck have a look!

    B.T.W. I also have a child theme download this is different to work with the Dark option of Twenty Eleven.

    HTH

    David

  6. Dot
    Member
    Posted 3 years ago #

    Hello
    I tried no spaces; no joy :/
    How do I unzip? I chose "extract" - still no joy!
    What do you mean by different to work...?
    Diane

  7. Digital Raindrops
    Member
    Posted 3 years ago #

    Diane,
    Step by step!

    1. Are you using:
    -- ftp
    -- file manager in the websites control panel
    -- uploading the theme from Admin > Appearance?

    2. Is yours a single or multi-site installation?

    Answer these and we can give some step by setp instructions!

    If you created a folder in the Control Panel it might be that WordPress cannot see it.

    What do you mean by different to work...?

    The post on the link above, 'if read' does explain what I meant.

    I wrote this part of the Codex Child Theme page.

    It is only relevent if you were using the Twenty Eleven Dark Theme, in my child theme I use a second file called custom-style.css this is loaded last so styles injected into the header by plugins and the dark theme option can be changed.

    Lets not worry about that for now, just get your child theme active.

    HTH

    David

  8. Dot
    Member
    Posted 3 years ago #

    Hello Digital Raindrops

    Thanks for this!

    1. I am using the file manager in the website control panel

    2. I'm not sure what you mean by a multi-site installation, I only have one blog and am hosting it with Hostagator

    So you say that Word Press may not be able to see the file if created in the control panel hm interesting; how might I ensure that it does see it?
    Diane

  9. Digital Raindrops
    Member
    Posted 3 years ago #

    Hi Diane,
    It could be 'permissions' and would depend on what OS hostgator use, for now delete the folder you created, take one of the child theme zips, do not unzip it, then go to:
    Admin > Appearance > Themes > Install Themes, and Upload the zip, then you will be able to activate the child theme.

    Once activated ask Hostgator how to setup FTP, you will need this to transfer changed files, if you are running Windows look at the free InstantWP (I use this one) and do your development on a local install, then use FTP to upload changed files.

    If you are not on Windows look for a local WordPress install package for your operating system.

    HTH

    David

  10. Dot
    Member
    Posted 3 years ago #

    Thanks David,
    and off I go...

  11. Digital Raindrops
    Member
    Posted 3 years ago #

    Hey!
    I see you have it uploaded and activated ;)

    I had a quick Google and Hostgator supports FTP, next step get an ftp client and get connected, I am on windows and use the free FileZilla for ftp, the HostGator help looks quite good, or a Google search would help with getting the FTP setup.

    I say use a local setup to develop as errors are so easy to deal with, test local and when happy FTP the changed files.

    HTH

    Mark this topic resolved please, and happy developing!

    David

  12. Dot
    Member
    Posted 3 years ago #

    Ha, perfect and there it is thankyou!

    ...So in order to adapt it, I have to input the relevant HTML (with the import rule)right?

    And in order to ensure these (CSS) files are read, I need to upload them via FTP?

    I'm not sure what you mean by do the development on a local install; what is a local install?

    I am fascinated by your site - presumably down loads like the dynamic footer might be down loaded as part of the child theme?

    Thanks
    Diane

  13. Digital Raindrops
    Member
    Posted 3 years ago #

    I am fascinated by your site - presumably down loads like the dynamic footer might be down loaded as part of the child theme?

    Good news is that twenty eleven has a dynamic footer, just add widgets to footer one, two or three, and the footer will show and resize based on the number of activated widgets.

    Nearly all posts on my website have a theme download, this is in most cases a functional Child Theme in its own right, and can be activated for testing, the idea being that if you like the changes you can then merge the files, functions and calls, into your own child theme, so like a code reference library, and all free :)

    ...So in order to adapt it, I have to input the relevant HTML (with the import rule)right?

    Wrong, if you wanted to change something in the header.php you would copy the one from twenty eleven, save it in the child theme and make the changes in the child theme, if WordPress finds a file in the child this takes priority over the parent!

    A good way to get started is not to code but investigate, look at a few tutorials for child theme, get your head around the changes, download any free child themes, these will only have a few files, again investigate.

    And in order to ensure these (CSS) files are read, I need to upload them via FTP?

    You can edit the files from Admin > Appearance > Editor, but make a mistake can cause an error and you will then not have access from wp-admin until you download and correct the file.

    I'm not sure what you mean by do the development on a local install; what is a local install?

    A local install is a whole WordPress environment on your local drive, this will include php, WordPress, phpMyAdmin etc:, it is just the same as online, if conneted to the internet you can update, install plugins, just like online.

    Local Installs: XAMPP, LAMPP, WAMPP, InstantWP, WebMatrix.

    If you look at the number of topics here that are where code has been changed on a production website via the admin editor, and the lockouts that are caused, you will see the benefit of a local test website.

    Here you can easy develop and test themes, changes and plugins for your Website offline, make a mistake it is just a local file so no problem, a bad plugin just delete the folder.

    HTH

    David

  14. Dot
    Member
    Posted 3 years ago #

    Thank you for all this

    I now have an activated child theme, and configured FTP :)

    So to merge your themes you recommend doing it via a dummy site?

    Otherwise do I have to dip into the themes/twenty eleven child/CSS through FTP or can I now customise from admin/edit? And do I put all the changes onto a single CSS?
    Diane

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.