• 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: https://codex.www.ads-software.com/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.

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter meganano

    (@meganano)

    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…

    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

    Thread Starter meganano

    (@meganano)

    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: https://www.dominantparadigm.com
    Description: This should be the description
    Author: myname
    Author URI: https://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: https://www.ads-software.com/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.

    Thread Starter meganano

    (@meganano)

    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.

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

    Thread Starter meganano

    (@meganano)

    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.

    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.

    Thread Starter meganano

    (@meganano)

    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.

    Then it is your text editor.

    Thread Starter meganano

    (@meganano)

    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.

    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.

    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.

    Thread Starter meganano

    (@meganano)

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

    Anybody else here used text edit with success?

    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 https://www.flos-freeware.ch – works just like notepad without the problems, and is free.

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

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

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Modifying a pre-existing theme – problems’ is closed to new replies.