WordPress.org

Ready to get started?Download WordPress

Forums

Modifying a pre-existing theme - problems (25 posts)

  1. meganano
    Member
    Posted 8 years ago #

    I've been searching through the forums and the codex trying to sort this issue out, but I keep having problems and so far haven't found a thread that adequately addressed my issue.

    My approach is relatively simple. I find a theme I like but want to modify slightly.
    1) I download it
    2) I copy the theme folder and rename it
    3) I open the stylesheet in the new folder change the details at the top of the page ala: http://codex.wordpress.org/Theme_Development#Theme_Style_Sheet
    3) I upload the folder to my wp-content/themes folder on my server.
    4) I go to the theme manager page in the WP dashboard and invariably get some version of: "The following themes are installed but incomplete. Themes must have a stylesheet and a template."

    Somehow in the past, various versions of the details at the top of my style.css page actually worked, I was able to upload the theme, change the style sheet and preview it sucessfully. Overnight something changed and I can't preview my old theme, nor the new theme I'm trying to work on.

    The error message that implies that there is no stylesheet or template in the folder is confusing. The theme that I'm modifying is one that is fully functional and presumably has all the necessary parts. Presumably also the theme should be able to stand alone rather than be based on a template in another folder... so why am I having this problem.

    Rather than try to create a new theme from scratch, it makes sense to me to try to learn about it by tinkering with different parts of a theme to see how my changes work.

    Three major questions I need answered:
    1) Other than changing the details at the top of the style-sheet, is there some other thing that I'm neglecting to change to make the theme act as a new separate theme?
    2) Can someone point me in the direction of a clear directive as to how best to write the details in the stylesheet so as not to break the theme. (I've already read the codex page postd above, which is kinda vague on details)
    3) Am I actually missing the templates if they are templates that work for a pre-existing theme?

    Thanks for your help. I'm new to this... so detailed responses would really be appreciated. I am spending a lot of time in the codex trying to sort this out.

  2. meganano
    Member
    Posted 8 years ago #

    Just a thought... I'm wondering if information that's in my details that's duplicated in other details, say the original theme I'm modifying, or my initial theme design is somehow causing the problem. The codex says, "No two Themes are allowed to have the same details."

    But how much actually needs to be changed? I thought changing the theme name and author might suffice...

  3. moshu
    Member
    Posted 8 years ago #

    Usually changing the name and the folder name is enough. Sometimes (if WP doesn't "behave" :) I add at the top:
    Template: mytheme <== this should be exactly the foldername

  4. meganano
    Member
    Posted 8 years ago #

    Moshu, thanks for replying... I think one of your themes was one I was working with earlier...

    So... just to make sure I had the nomenclature correct, i went back to the codex guide on the stylesheet and here is the text in my details:

    /*
    Theme Name: dp2
    Theme URI: http://www.dominantparadigm.com
    Description: This should be the description
    Author: myname
    Author URI: http://www.dominantparadigm.com
    Version: 1.0
    .
    General comments/License Statement if any.
    .
    */
    1) Originally I had left out the "template" line because another thread I read gave me the impression that I really didn't need it unless I was actually adapting from a template in another folder: http://wordpress.org/support/topic/25024.
    When I uploaded the new stylesheet with the above details, it no longer registers as broken... I can select it... but the theme does not work properly and on the menu where the regular details and description should be, were several columns of code... my stylesheet... unbroken lines... just line after line.

    2) So I added the template line per your suggestion (Template: dp2) and I also made sure my FTP client was uploading in text format. Now it's listed as broken again... and of course the code is all displayed as well in the dashboard.

    argh.

  5. meganano
    Member
    Posted 8 years ago #

    This theme now works when selected... BUT, the code for the entire stylesheet makes its appearance in the "Name" category. This makes for a very messy theme selector page.

  6. moshu
    Member
    Posted 8 years ago #

    There were several reports like yours in the forum: it was always caused by some messy editor and/or FTP client.

  7. meganano
    Member
    Posted 8 years ago #

    Yeah- I thought of that- so I opened the stylesheet in textedit, made sure to save it as text- and reuploaded it with fetch... which supposedly has a good rep for not screwing that stuff up. I checked the prefs in fetch to make sure that I was uploading the file as text and not some other format. i also checked to make sure the linebreaks at the end of each detail line was actually a line-break and not another invisible character... still have the same problem.

  8. Michael Bishop

    Posted 8 years ago #

    The problem might be with some encoding via text edit. I suggest getting Smultrona free open-source text editor more design for editing these type of files.
    You may want to also look at getting Cyber duckalso a free, open source mac osx FTP client.
    Nice thing about these two apps, is with cyberduck, you can edit on the fly directly on the server in conjuction with Smultron.

  9. meganano
    Member
    Posted 8 years ago #

    So that's a nice little FTP client, but it didn't solve my problem. Has anyone else out there had this problem? What did you do? I've used FUGU, Transmit, Fetch and Cyberduck to upload my style.css file and I still get the code displayed in the wordpress dashboard instead of the proper entries. I've made sure the file has been uploaded as a text only format and it hasn't solved the problem. At this time I'm willing to bet that its NOT my FTP client.

    Anyone got any ideas?

    thanks.

  10. moshu
    Member
    Posted 8 years ago #

    Then it is your text editor.

  11. meganano
    Member
    Posted 8 years ago #

    Ok... can you be more specific? How should I be saving these files so that they aren't screwed up by the text editor? I'm using textedit on the Mac. Is there something else out there than works for mac? Or some setting that should be changed. Obviously I'm not saving these files as .rtf files (I'm not THAT dumb) - I set the preferences in textedit to be text only.

    Help... I need some tangible solutions here.

  12. Beel
    Member
    Posted 8 years ago #

    You can't get "tangible" solutions here, only visual ones that hopefully will work ;-). Might be your text editor is not saving with line breaks, at least that has happened to one other person.

    Give a link to the css that will not display properly.

  13. techwench
    Member
    Posted 8 years ago #

    You could try Taco HTML Edit. It's free, and isn't bad.

    I've used it some, but I prefer ultraedit on the pc to do my coding, so I don't have lots of experience with it.

  14. meganano
    Member
    Posted 8 years ago #

    here's the link to the css:
    http://www.dominantparadigm.com/wordpress/wp-content/themes/dp2/style.css

    Anybody else here used text edit with success?

  15. vkaryl
    Member
    Posted 8 years ago #

    meganano, the times this sort of thing has happened to me, it's been extra blank lines before the closing comment operator in the CSS comment section. Try taking out all the blank space before the */ closing operator.

    Oh, btw, the best text editor out there is notepad2 from http://www.flos-freeware.ch - works just like notepad without the problems, and is free.

  16. techwench
    Member
    Posted 8 years ago #

    Oh, btw, the best text editor out there is notepad2 from http://www.flos-freeware.ch - works just like notepad without the problems, and is free.

    But they don't have a Mac version, do they?

  17. meganano
    Member
    Posted 8 years ago #

    Hrm... removed any possible blank space before the */ closing operator... but that's the code that indicates that's what's inside is a comment- right? Why should it matter if there's blank space in there?

    Now I'm remembering... someone else posted on the forums something about dreamweaver being a problem for stylesheets... unless you change the settings. Of course they didn't specify what settings needed to be changed in order for the file to save in the correct format. Can anyone explain what settings might screw up a textfile that gets saved as a .css?

    Thanks.
    Mega

  18. vkaryl
    Member
    Posted 8 years ago #

    No clue, won't allow DW house room.... but take my word for it, blank space inside the comment operators does sometimes seem to matter. I myself had that happen on several themes, and until I took out a couple of lines before the closing */, it didn't get fixed.

  19. TechGnome
    Moderator
    Posted 8 years ago #

    A couple of other things to look at:
    1) Make sure *all* of the settings terminate in a ; .... see your styling for #content to see what I mean
    2) You've got a couple of cases where there is a ; .... but on a blank line (see .quotation & .footnote at the tend)

    -tg

  20. meganano
    Member
    Posted 8 years ago #

    On the surface, this last comment makes sense to me, but then I remember that this theme is of course borrowed from someone else. Thus the stylesheet is adapted- I did not write all the code and those errors are from the original code. I know because I have notes about all the code I changed. So why doesn't the theme that this stylesheet came from do the same wacky shit mine did?

    vkaryl: "won't allow DW house room"
    huh? People. Please watch out how much slang/jargon you use on the support forums. Lots of newbies like myself are posting here looking for help and sometimes a helpful explanation that is riddled with unfamiliar jargon ceases to be of any use. Can you explain what you mean by this?

    I'll go and check for code inconsistencies, and typos just to see if that's the problem... I'll post my results shortly.

  21. meganano
    Member
    Posted 8 years ago #

    Ummm yeah, so there were some definite typos in my code. No doubt about that. I can't attest to the fact that my code is perfect. It's not. There are a number of different style conventions used in it- probably from being adopted by so many people. But fixing those typos didn't fix the "all the style.css code displays in the dashboard problem." Any other bright ideas?

  22. meganano
    Member
    Posted 8 years ago #

    Ok... I'm researching the effect of using Dreamweaver on the stylesheet... not making any changes, just opening and saving a functioning stylesheet with dreamweaver to see what happens... notes forthcoming.

  23. flyingcat
    Member
    Posted 8 years ago #

    Dreamweaver is my favorite.

    -----
    http://jesse.blogs-china.com/

  24. meganano
    Member
    Posted 8 years ago #

    I've found a solution to this problem. It's posted in this thread:
    http://wordpress.org/support/topic/25490

  25. oneandhalf
    Member
    Posted 8 years ago #

    I got the same problem in my blog: http://www.oneandhalf.com

    meganano, I found your solution worked very well.

    cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic