I’ve run across a couple of themes that don’t include comments.php or files for popup comments. So does this mean that they are pulled from the default in WP admin or what?
I want to use authimage and it tells me to paste code into the wp-comments.php page but if my theme doesn’t have it, where should I paste? And if the theme doesn’t, then can I copy from the defaults or what? This one has me puzzled.
As far as I could see, if a file in a theme is missing it is automatically taken from the default. So yes, you should be able to copy it from the default and put it in your theme.
If you did a lot of work on your own theme, you probably need to hack the new file to fit in your theme.
So it would come from the wp-content/themes/default or from…..?
In other words, does WP feature default “templates” in case there aren’t any in a theme?
Practically you can have a “theme” that has just a stylesheet and eventually some images. These themes can refer to a ‘template’ (i.e. an index.php file) of another package. The other day I’ve downloaded the Odysseypack and it has 4 themes but all they use the index of the Gemini. One of the “themes” has a CSS file and a 1KB bgimage.
The line on the top of CSS file defines what template is going to be used.
Theme Name: Maximus Default
Description: ... etc.
If it is the default, than uses the default.
That’s cool, but it still doesn’t tell me where the default is. Does it use a default WordPress came with or the default Kubrick? Is there something to fall back on if Kubrick isn’t installed or didn’t have the comments.php (whatever it’s called) file?
If I have to put the code for authimage into my comments file, where is it?
If comments.php or comments-popup.php are missing from a theme, the ones in the default theme are used.
ryan is on the dot…I found out about this just last week when I removed the default theme and had not included the files in the new one…doh!
One can actually remove the comments ability from the blog altogether by simply removing a tag from the theme (if this is actually wanted):
<?php comments_template(); ?>
This is beginning to become an issue. Because as Lorelle points out if there is no comments or indeed any other php it will load the default ie the new default.
Consequently there will be a style / positioning mismatch. The answer is to load a full set of php files for your theme regardless. Odyssey Alpha One was a boiler plate release of the first WP theme pack to test the presentation manager. As moshu points out it only has the hacked indexes and the stylesheets. Future releases will include the full set of files. OT: I am also modularising the CSS into php to make for easy maintenance. Plus a bunch of other exciting stuff. 🙂
So if I grab the comment files from the default, I have to deal with the style issues….oh, lovely.
We really need to make a point of this in the Codex! And in any place where people are either getting, learning, or posting themes!
I live in hope that all themes posted in the AK style comp will be complete in this regard.
well if I do release a “parasite theme”, as it was eloquently put, it would be with whatever files it came with. I’ve rarely found a theme that has a full set of files. Doesn’t mean I haven’t found any, but they are in the minority for me at least.
What would you define as a “full set” of files?
index.php, style.css, comments.php, comments-popup.php. Other files are used at the discretion of the theme author.
And other files would be…?
Just so everyone other stands which are standard and which are “optional”.
Other files can be anything. linkbar.php, chocolate-bar.php, belly-up-to-the-bar.php, my-left-footer.php, whatever. There are certain files that have special meaning to the theme system, however. The Theme Development page gives a rundown of these.
As it may prove difficult to regulate the structure of third-party themes, maybe we could improve the way the admin pages handle this? Information about which directory a theme is grabbing its templates from is already included on the theme admin page, but would it be possible to also list the contents of the active theme directories so users could see at a glance which files were included?
And maybe change the background colour of the theme information at the top if there are no comments templates or it’s a stylesheet-only theme, just to draw the user’s attention to the fact that the template files are in more than one directory.
- The topic ‘Themes without comment files?’ is closed to new replies.