WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Child theme has lost the formatting of the parent (13 posts)

  1. fluent
    Member
    Posted 1 year ago #

    I created a child theme using the TwentyEleven theme as a parent, so that I can change the font type and size of the site header and description, but the child theme doesn't seem to be picking up the formatting from the parent. The new style sheet is called style.css and is saved in a new folder called twentyeleven-child which is at the same level as the twentyeleven folder.

    The contents of the style.css file for the child theme are below:

    /*
    Theme Name: Twentyeleven Child
    Description: Child theme for the twentyeleven theme
    Author: Your name here
    Template: twentyeleven
    */

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

    #site-title a {font: bold 50pt "Lucida Calligraphy", Verdana, Arial, sans-serif;
    }

    #site-description a {font: bold 14pt "Lucida Calligraphy", Verdana, Arial, sans-serif;
    }

    I checked some other posts on this issue and replaced double quote marks with single for the url, but no improvement. I have also tried making a twentytwelve child theme instead but still no joy.

    Thanks in advance for your help.

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Did you activate (switch to ) the child theme?

    Can you post a link to your site?

  3. fluent
    Member
    Posted 1 year ago #

    Yes, the child theme is activated. The site is at:

  4. fluent
    Member
    Posted 1 year ago #

  5. fluent
    Member
    Posted 1 year ago #

    Damn link won't work. It's http://www.fluentinfood.co.nz

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    No, your site shows the regular parent theme - you can tell from looking at "View Source" of the HTML code and look at the linked stylesheet -- it shows the direct file path link to the parent stylesheet. When you have a child theme active, it will show the child stylesheet file path.

  7. fluent
    Member
    Posted 1 year ago #

    This is weird. When I log into my dashboard the child theme is definitely activated and when I visit my site from there all the formatting has gone and View Source shows the link to the child style sheet:

    <link rel="stylesheet" type="text/css" media="all" href="http://fluentinfood.co.nz/wp-content/themes/twentyeleven-child/style.css" />

    But when I log out and visit my site again, the Twenty Eleven theme is shown. Do I need to be hitting save somewhere before logging out?

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yes, that is weird. Yes, you should be saving when you've switched between themes. I'm also confused at

    all the formatting has gone
    -- a brand new child theme (before any changes) should look exactly like the parent theme.

    Are you sure the file structure is correct?

  9. fluent
    Member
    Posted 1 year ago #

    There is only an option to save if you customise the theme after activating it, but I have tried this too.

    The file structure is exactly as referenced in the link above. I can only assume that the child css is not referencing the parent for some reason, so any styling provided by the parent is lost.

    I checked my hosting and found a series of error messages of the following type:

    [Fri Oct 19 20:43:46 2012] [error] [client 118.82.160.5] (13)Permission denied: file permissions deny server access: /home/fluent/public_html/wp-content/themes/twentyeleven-child/style.css, referer: http://fluentinfood.co.nz/

    Does this mean anything to you?

  10. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Hmm, that certainly looks like it may be the problem. Unfortunately, I don't know much about permissions, though this may be helpful:

    http://codex.wordpress.org/Changing_File_Permissions

    Hopefully someone else will happen along here to help with it. Or you might try asking your hosts for help too.

  11. fluent
    Member
    Posted 1 year ago #

    Thanks for the link - I changed the permissions on the style.css for the child theme from 600 to 640 - no change, but will look into it a bit more. Thanks for your help.

  12. fluent
    Member
    Posted 1 year ago #

    An update - I changed the permissions on the child theme style.css to 644 and that solved the first issue (child theme not referencing parent). I also found that the WP-Supercache plug-in had stopped working so reinstalled and changed settings to not cache for known users, which fixed the second problem (my changes were only showing when logged into WP, but not once logged out). Thanks for your help WPyogi!

  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yay -- good for you for tracking it down...Good to know what it was too and it may help someone else who comes across this thread in the future.

Topic Closed

This topic has been closed to new replies.

About this Topic