• Resolved hinduismfacts

    (@hinduismfacts)


    Hi, I am trying to create a child theme for Twenty Eleven theme but when I preview or activate it, it seems to be broken.

    I did following things to create a child theme:

    I created a new folder in the themes folder named twentyelevenchild (Tried other names also). I created a style.css file and put the following code into it.

    ______________________________________________________________________
    *
    Theme Name: Twenty Eleven Child
    Theme URI: https://hinduismfacts.org
    Description: Child theme for the Twenty Eleven theme
    Author: Rahul
    Author URI: https://hinduismfacts.org
    Template: twentyeleven
    Version: 1.0
    */

    @import url(“public_html/wp-content/themes/twentyeleven/style.css”);
    ___________________________________________________________________

    But when I activate the child theme, it is broken. I had same problem with Twenty Ten.

    Please help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @import url(“public_html/wp-content/themes/twentyeleven/style.css”);

    That won’t work. But this ought to

    /* Import layout */
    @import url(../twentyeleven/style.css);

    See if that get’s the child theme working for you.

    Gary Darling

    (@garydarling)

    Also, your opening text appears to be missing a forward slash. Should be:

    /*
    Theme Name: Twenty Eleven Child
    Theme URI: https://hinduismfacts.org
    Description: Child theme for the Twenty Eleven theme
    Author: Rahul
    Author URI: https://hinduismfacts.org
    Template: twentyeleven
    Version: 1.0
    */

    Thread Starter hinduismfacts

    (@hinduismfacts)

    Thanx guys for your quick response. I made all the changes suggested by you but still no success. The new code looks like this:

    _______________________________________________________

    /*
    Theme Name: Twenty Eleven Child
    Theme URI: https://hinduismfacts.org
    Description: Child theme for the Twenty Eleven theme
    Author: Rahul
    Author URI: https://hinduismfacts.org
    Template: twentyeleven
    Version: 1.0
    */

    /* Import layout */
    @import url(“../twentyeleven/style.css”);
    __________________________________________

    I have tried with and without quotes in the import statement. I tried removing /* Import layout */ statement also.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Hrm. Well, it’s time to use The Pastebin! ??

    You’ve probably done this already but just to be complete,
    let’s start from scratch:

    1 – On your WordPress web server create an empty directory like so wp-content/themes/twentyeleven-child

    2 – Visit this Pastebin link https://pastebin.com/d7rJZF5q and click on the download link on that page.

    3 – That link will want to save as basic_no_frills_twenty_eleven_child_theme.txt and once it’s saved rename it to just plain style.css

    4 – Transfer using FTP (or however you transfer files) the style.css to that new and empty directory wp-content/themes/twentyeleven-child

    5 – Visit your WordPress dashboard themes page

    https://your-wordpress-url/wp-admin/themes.php

    6 – Look for and activate the theme that says

    Twenty Eleven Child Theme by Self-Help WordPress User

    Now visit your blog. It should look just like Twenty Eleven. Select View Source in your browser. The style.css file should have a line like this in the HTML source.

    href="https://your-url-here/wp-content/themes/twentyeleven-child/style.css"

    And that should do it. If you need to make any CSS changes, you can make them without fear on wp-content/themes/twentyeleven-child/style.css.

    Thread Starter hinduismfacts

    (@hinduismfacts)

    Thanx a lot, it worked. The only problem is, it is showing pages in the header menu as well as sidebar but I want pages to be in the sidebar only. Original theme does not have pages in header. Currently, I have removed pages from sidebar. Do you know how to fix it?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Try visiting https://your-url-here/wp-admin/nav-menus.php and edit the menu there.

    I think the menu settings are theme name dependent… when you switched to the new child theme the old navigation menu settings may have been lost.

    Epicurieuse

    (@epicurieuse)

    hello,
    I would like to create a child theme to my twentyeleven theme.
    I have the same problem that hinduismfacts had, I tried the pastebin process but unfortunately it still doesn’t works for me! When I activate my child theme, there is absolutely no styling on my website!
    When I select viewsource in my browser I can find the following code :
    <link rel=”stylesheet” type=”text/css” media=”all” href=”https://epicurieuse.com/wp-content/themes/twentyelevenchild/style.css&#8221; />
    which means, I guess, that the @import function is working?

    I tried to reinstall the parent twentyeleven theme, with or without quotes in the @import function, but nothing works… I am really desperate!

    Many thanks in advance for your help!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Epicurieuse, Please start your own thread. It’s considered rude to intrude on someone else’s topic, and I’m sure you’ll get assistance on your own thread.

    Thread Starter hinduismfacts

    (@hinduismfacts)

    Thanx Jan, it resolved on its own.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Twenty Eleven Child Theme not working’ is closed to new replies.