WordPress.org

Forums

[resolved] creating child theme is driving me insane! (9 posts)

  1. mail@wm-johnston.com
    Member
    Posted 2 years ago #

    Can anyone help before I tear my hair out?

    I'm new to WP but confident at web page design.

    Am trying to create a new child theme.

    Have followed the Codex line for line: New child folder in the 'themes' folder; correct header in the child style.css (copied and pasted from Codex); added the link to the parent theme - in this case
    @import url("../twentytwelve/style.css");

    All looks fine as per the Codex, but all I get is the basic default style - see http://wm-johnston.co.uk/wordpress123/

    Any help would be most appreciated . . .

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    I can see the child theme is activated, but the stylesheet style.css cannot be found.
    http://wm-johnston.co.uk/wordpress123/wp-content/themes/twentytwelve-child/style.css
    Are you sure you uploaded your stylesheet to the correct folder?

    Can you post the child theme stylesheet header.

  3. mail@wm-johnston.com
    Member
    Posted 2 years ago #

    Hi Keesiemeijer,

    Thanks for your speedy reply.

    The stylesheet - style.css - is inside wp-content/themes/twentytwelve-child

    The stylesheet code is:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      http://example.com/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Your name here
    Author URI:     http://example.com/about/
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url("../twentytwelve/style.css");
    
    .site-title a {
        color: #009900;
    }

    Any ideas would be gratefully received. This is driving me daft.

    Thanks.

  4. That looks correct to me but try this one from Quirm.net and add your .site-title styling to the bottom of that one just as a test.

  5. mail@wm-johnston.com
    Member
    Posted 2 years ago #

    Hi Jan,

    Many thanks for that. Most kind.

    I've used the Quirm code in my stylesheet:

    /*
    Theme Name:Twenty Twelve Child
    Version: 1.0
    Theme URI: http://quirm.net/themes
    Description: A basic starter child theme for Twenty Twelve
    Author: Mel Pedley
    Author URI: http://blackwidows.co.uk
    Template: twentytwelve
    License: GNU General Public License v2
    License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    */
    
    . . . 
    
    /* Import layout */
    @import url(../twentytwelve/style.css);

    But I'm still getting the default css styling when I view the page:

    http://wm-johnston.co.uk/wordpress123/

    I've updated the file and get 'File edited successfully'.

    I must be doing something really stupid - but I can't see what it is.

    Any ideas?

    Thanks

  6. mail@wm-johnston.com
    Member
    Posted 2 years ago #

    Sorry - only just spotted the Moderator note about posting code.

    Will do so in future.

  7. Don't worry about the code, at least you didn't post 1,500 lines. ;)

    The problem is a permission issue. The child theme style.css is not readable.

    http://wm-johnston.co.uk/wordpress123/wp-content/themes/twentytwelve-child/style.css?ver=3.5.1

    Check your file/directory permissions, I think that once that is corrected it will all sort itself out.

  8. mail@wm-johnston.com
    Member
    Posted 2 years ago #

    Brilliant!

    I'd never have spotted that.

    All sorted now.

    Can't thank you enough.

  9. You're welcome, glad to help. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags