2

I am customising someone else's theme to allow the website owner to edit more regions than she could previously.

I copied the theme into a new folder, with a different folder name to the original.

I edited style.css, and replaced the theme information with:

/*
Theme Name: Customisable SuperBaby & Ted
Author: Steve Doig
Author URI: http://tech.doig.com.au
Description: Modified version of SuperBaby & Ted to allow edits to the home page and footer navigation.
Version: 2.0
*/

Yet when I upload style.css to the theme's folder, I see this in Appearance > Themes:

enter image description here

I've added a blank line between each line, with no difference.

I've copied this info into a new Notepad, copied from that Notepad, and pasted back into the original Notepad with no difference.

Can you see what is going on here?

10
  • 2
    I copied and pasted the headers in my test theme with no modification and it works perfectly for me.
    – gmazzap
    Dec 13, 2013 at 7:44
  • 1
    Have you added any functions to the new themes functions file? Looks like the output is getting filtered. What plugins are you using to allow them to make changes to their theme?
    – Anagio
    Dec 13, 2013 at 7:46
  • Or, it can be a CSS Minification's result. What about starting the commenting line with /*! instead of plain /*. (Details...) Dec 13, 2013 at 8:40
  • If I use /*! Wordpress ignores everything, and just uses the folder name as the theme name.
    – Steve
    Dec 13, 2013 at 9:49
  • 1
    You don’t use Mac line endings \r, do you?
    – fuxia
    Dec 13, 2013 at 13:20

1 Answer 1

0

I use Notepad2 to edit style.css

I opened it in Notepad++, and there were extra line breaks on every line.

I opened it in Dreamweaver CS6, selected Commands > Apply Source Formatting, and all extra line breaks were removed.

I uploaded it, and it now views normally in the browser (Originally viewing style.css showed the line breaks were gone).

The Theme information is now displaying properly.

Note: the style sheet was displaying properly in Notepad2 originally. Perhaps Notepad2 handles line breaks differently.

Thanks for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.