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
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
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.
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: 7 years ago
Active Installs: 3,000+
Got something to say? Need help?