• Resolved mrlotker

    (@mrlotker)


    I have been trying to create a child theme based on PageLine’s free Platform theme. My goal is to add multiple columns to create a magazine style theme and also add a featured posts slider. When I create the child theme, all of the layout formatting disappears (no side bar or seperate sections on the page), even though I include an @import line in the style.css of my child theme. I also can’t control any layout functions from the dashboard.

    Why is the layout disappearing? Is this just not a good theme to use for a child theme? Has anyone had success with this? Thanks for the help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • A link would help, if it’s possible.

    Could you post the top fifteen or so lines from your stylesheet (the one that is not being picked up)? Don’t post the whole thing or the moderators will cut it out for breaching the forum rules. I just want to see your comments lines and the @import statement.

    Cheers

    PAE

    If the styles disappear, as peredur is eluding to, it probably means you’re not importing your styles correctly. If you posted a link, we could confirm that for you.

    Thread Starter mrlotker

    (@mrlotker)

    Thanks for the quick response! I’m working off WAMP so I can’t post a link but here is the top of my stylsheet:

    /*
    Theme Name: Child of Platform
    Description: A customized WordPress magazine theme based on Platform by PageLines.
    Author: mrlotker
    Version: 0.0.1
    Template: platform
    */
    @import url(../platform/style.css);

    I’ve also tried with single and double quotes inside the import parentheses. The font and background color formatting remains but the layout turns into a single column…including the info that was in the sidebar. Thanks for your help!

    Thread Starter mrlotker

    (@mrlotker)

    I didn’t notice this before but when I “preview” my child theme within the wp dashboard before applying it I see the following error messages:

    fopen(C:\wamp\www\nioceans/wp-content/themes/ChildofPlatform/style.css) [function.fopen]: failed to open stream: No such file or directory in C:\wamp\www\nioceans\wp-includes\functions.php on line 4339

    fread() expects parameter 1 to be resource, boolean given in C:\wamp\www\nioceans\wp-includes\functions.php on line 4342

    fclose() expects parameter 1 to be resource, boolean given in C:\wamp\www\nioceans\wp-includes\functions.php on line 4345

    Along with tables of information. Maybe that helps…

    Yep. Your child theme style sheet doesn’t exist as far as fopen() is concerned, anyway. You’ve also missed the quotation marks off the reference to the parent style sheet in the @import statement.

    You should be able to open your stylesheet by doing:

    http://localhost/nioceans/wp-content/themes/ChildofPlatform/style.css

    … and you should be able to follow that path (C:\wamp\www\nioceans\wp-content\themes\ChildofPlatform\style.css) to your style sheet on your local file system.

    I take it your capitalisation is correct for things like ‘ChildofPlatform’? That’s why I always stick to lc letters, personally, for files and directories. I don’t know how picky Apache/PHP is on Windows about this, but any Unix-like system will choke if case is not matched properly.

    Any help?

    Cheers

    PAE

    Thread Starter mrlotker

    (@mrlotker)

    Peredur and Jason: thank you so much for your help!

    Peredur, you were right, it turns out I needed to remove the spacing and capitalization from the folder names in my file system so that the @import statement could find the stylesheet. Also added the quotes back in for good measure.

    Thanks again for your help and time! It’s nice to know that newbies just getting started can get reliable help here!

    I wouldn’t guarantee the ‘reliable’! Not from me, at any rate.

    If you could mark your post as [resolved] it would be helpful. It makes it easier for other seekers after wisdom to find the solution. It also means that people trying to help know to ignore the thread.

    Glad you got it sorted.

    Cheers

    PAE

    I had a similar issue and this really helped me. I figured out it was because I was trying to replace the css file each time it didn’t look quite right.

    It worked much better to create a new folder each time I wanted to make a change. I was unable to delete a few of the ones I tried to replace because it gave me an error saying nothing was there. So there are 5 “child”like folders, which is a little messy.

    But my changes worked, so thank you!

    Why are you doing that?

    Only one child theme (or parent theme for that matter) can be active at any one time. So the idea is to have one child theme and make all your changes there. I don’t understand why you’d want more than one.

    Cheers

    PAE

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Child Theme: All formatting disappears even with @import tag’ is closed to new replies.