WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Post Thumbnail

This plugin enable bloggers to upload images, crop and save it as post thumbnails without manually copy-n-paste custom field values. For theme develop

I am developing a WordPress theme. How do I configure WP Post Thumbnail to work specifically for my theme?

This is the purpose of which WP Post Thumbnail is written, for theme developers who wants to use multiple dimensioned thumbnails in their WordPress themes. The current version of this plugin assumes that you, as theme developer, have basic knowledge of writing a configuration file in XML format and calling/placing the thumbnails’ custom field value within your theme.

For the visually inclined, click here to open an image that illustrates basically how theme developers can use WP Post Thumbnail to handle thumbnail(s) in their WordPress themes.

I have included an XML configuration file in the plugin's main folder called 'wppt.xml':

<?xml version="1.0" encoding="UTF-8"?>
<wp-post-thumbnail>
    <pft_widescreen>
        <name>Widescreen</name>
        <desc>Recent posts</desc>
        <width>270</width>
        <height>110</height>
    </pft_widescreen>
    <pft_square>
        <name>Square</name>
        <desc>Category post and more</desc>
        <width>150</width>
        <height>150</height>
    </pft_square>
    <pft_rectangle>
        <name>Rectangle</name>
        <desc>Latest featured post</desc>
        <width>390</width>
        <height>270</height>
    </pft_rectangle>
</wp-post-thumbnail>

The sample XML file configures 3 different thumbnails titled <pft_widescreen>, <pft_square> and <pft_rectangle>.

The node titles are also used as custom field keys to call specific thumbnails to appear in your theme. For instance, to get the square thumbnail:

    <img src="<?php echo get_post_meta($post->ID, 'pft_square', true); ?>" />

Each thumbnail has four properties:

<name> specifies a friendly name to appear in the thumbnail tab in 'Write Post' area.
<desc> a short description about the thumbnail
<width> width of thumbnail in pixels
<height> height of thumbnail in pixels

IMPORTANT: All fields are required.

Save your file as 'wppt.xml' and put it in your theme's directory. Blogs that uses your theme, and has WP Post Thumbnail plugin activated, will detect your 'wppt.xml' configuration file.

Where are all the cropped thumbnails stored?

They are stored in 'wp-post-thumbnail' folder inside your WordPress default upload path. Eg. '/wp-content/uploads/wp-post-thumbnail' by default.

Requires: 2.6.2 or higher
Compatible up to: 2.6.2
Last Updated: 2008-10-18
Downloads: 66,991

Ratings

3 stars
3.7 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
33,6,2
0,3,0
18,11,2
0,11,0
25,4,1
9,11,1
0,6,0
0,1,0
0,3,0
0,2,0
33,3,1
0,1,0