Child theme CSS not working

  • Anonymous

    #3885

    Hello,

    I have attempted to create a child theme but when I use the code that is supplied in the “how to modify Graphene using a child theme” post, all the styling disappears from the site. Here is the code I’m using:

    /*

    Theme Name: Child of Graphene

    Theme URI: http://cardpaymentoptions.com/

    Description: Child theme for the Graphene theme

    Author: Parker West

    Author URI: http://cardpaymentoptions.com/about/

    Template: graphene

    Version: 1.0

    */

    @import url(“../graphene/style.css”);

    I’m a still educating myself in using child themes, so maybe I’m missing something. Any idea what is going wrong?

    Anonymous

    #26449

    If you are having a hard time creating a child theme use this. I posted this on Beginners resources, it’s a plug-in that will create a child theme automatically with one click.

    This should help for those having a hard time understanding how to create a child theme.

    http://wordpress.org/extend/plugins/one-click-child-theme/

    Download the plugin and literally click one button to create a full child theme. Your new folder on your ftp will show the new style.css, screenshot, style.rtl.

    After that your ready to edit your Child Theme without ever touching the original parent theme.

    Anonymous

    #26450

    Hi Tee,

    Thank you for the suggestion. I’d rather not rely on a plugin if I can help it. It seems like I must have something wrong with the import funtion. I noticed that there are multiple CSS files in the Graphene theme folder. I wonder if I need to call more then one file.

    Anonymous

    #26451

    Try changing your theme URI back to this:

    http://example.com/

    Anonymous

    #26452

    This is probably a stupid question, but you do have you child Theme activated correct? Not the actual Graphene theme?

    You only need one that is style.css

    Prasanna has several useful tutorials on his blog site. Here’s one for creating a child theme.

    http://www.prasannasp.net/graphene-child-theme-template/

    Anonymous

    #26453

    Yes URI’s are optional you can make it look like this.

    /*
    Theme Name: Child of Graphene
    Description: Child theme for the Graphene theme
    Author: Parker West
    Template: graphene

    (optional values you can add: Theme URI, Author URI, Version)
    */

    @import url("../graphene/style.css");
    Mod

    Kenneth John Odle

    #26454

    Well, you’ve definitely got some weird things going on there.

    For example, you have two style sheets with a .php extension:

    <link rel='stylesheet' id='myrp-stuff-css' href='http://cardpaymentoptions.com/wp-content/plugins/MyRP/myrp-hotlink-css.php' type='text/css' media='all'/>

    <link rel='stylesheet' id='msw_wpfm_scan-css' href='http://cardpaymentoptions.com/wp-content/plugins/wordpress-file-monitor/wordpress-file-monitor.php?ver=scan' type='text/css' media='all'/>

    Those files contain styling information; they should end with .css

    Your Graphene style sheet has been stripped of all its comments and white space. All your style sheets end with 9cc648; they should end with a version number.

    Explaining how these weird things have happened might explain why your child theme won’t work.

    Also,

    I noticed that there are multiple CSS files in the Graphene theme folder. I wonder if I need to call more then one file.

    No. Only call the basic Graphene style sheet.

    Anonymous

    #26455

    Thanks for all of your input everyone. Ken, you bring up an interesting point with the style sheet. It has been minified by Cloudflare, which might be the issue. The other files you speak of are related to plugins. If I figure it out, I’ll let you all know.

    Mod

    Kenneth John Odle

    #26456

    Yes, Cloudflare can cause a lot of problems. Try disabling it and trying the child theme again. If it works, then we know Cloudflare is the issue.

    Anonymous

    #26457

    Ok, it look like it was Cloudflare that was causing the problem. I seem to be able to get the child theme to work now, but my top navigation menu gets wacky and shows a bunch of links that aren’t normally there. The background also reverts back to the original graphene background. Is there a way to make these settings automatically transfer over to the child theme?

Viewing 10 posts - 1 through 10 (of 14 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.