Post-release theme fixes

Once again, this is just another post letting everyone know that my themes, including Sandbox, have been updated. I hadn’t properly tested the new gallery short code in WordPress 2.5 and therefore my themes didn’t work too well with it, since the default gallery short code inserts a style element (as compared to attributes) within the body. Not good. The gallery short code is now handled properly by each theme.

There was another significant change. For single posts that are actually attachments, WordPress looks for a template file in the theme directory that makes the abbreviated mime-type. For JPEG image (image/jpeg), WordPress will look for a template file named image.php in the current theme directory.

If that file isn’t present, it then looks for attachment.php and then falls back on single.php. So each theme includes a new file, image.php. The general attachment file remains and was modified accordingly.

For Sandboxers, the relevant changesets from version 1.5 to the just-released version 1.5.2 are 247, 248, 249, 250, 251, 252, and 253. So now go on and enjoy new themes.

5 Comments

  1. Posted April 2, 2008 at 3:07 pm | Permalink

    I saw that image.php. I’m a little surprised it wasn’t mentioned before the release, especially with there being a dedicated “theme compatibility” page in the codex.

  2. Posted April 2, 2008 at 3:07 pm | Permalink

    I wonder if there are other mime-type templates that also work?

  3. Posted April 2, 2008 at 4:10 pm | Permalink

    Yes. I played around a bit with possible file types. Yes, you could have a video.php theme file for .mov attachments, audio.php theme file for mp3 attachments, and so on. You could have a text.php for plain text files you’ve uploaded.

    Check out the get_attachment_template function in wp-includes/theme.php. It’s similar to the mime-type function in the Sandbox theme (for attachments!). Very similar. ;-)

  4. Posted August 31, 2008 at 4:56 am | Permalink

    hi there, I’m using your plain text blog theme, tho i changed the lettering to hot pink and such, i just wanted to say thanks for a new theme that works with my gallery… i need that fluid width.. yours is the second theme i’ve found that the sidebar doesn’t go under the gallery post…

  5. shayne
    Posted September 9, 2008 at 3:00 pm | Permalink

    Thank you for this theme. I have a question how can I keep the comments with an area so they do not go to the far right of the screen. For example the same width as the Comment form box.

Post a Comment

Your email is never shared. Required fields are marked *

*
*
By submitting a comment, you hereby grant perpetual license to reproduce your words, name, and/or Web site in attribution.