Simple Post Thumbnails Installation Instructions
WordPress 2.8 Specific
Upload Plugin Files
- Download the plugin archive and extract the files it contains. DO NOT change any folder or file names as this will cause errors in the plugin.
- Using an FTP client to access your host web server, upload all plugin files and their containing folder to the wp-content/plugins directory provided by WordPress. For example, all of the Simple Post Thumbnails plugin files should be in wp-content/plugins/simple-post-thumbnails.
Activate The Plugin
- Log in to the WordPress Administration Control Panel.
- Select the Plugins menu item.
- From the list available plugins, click Activate next to the Simple Post Thumbnails plugin.
If you get a message at the top of your admin saying the thumbnails folder could not be created, do the following.
- Log into your site via FTP or File Browser provided by your host.
- Browse to the wp-content folder within your WordPress install
- Create a new folder called thumbnails within the wp-content folder of your WordPress install (i.e. wp-content/thumbnails).
- Right click on the new thumbnails folder and change the permissions to 755.
If you get a message at the top of your admin saying the thumbnails folder is not writable, verify that the folder's permissions allow the folder to be written to. Try the following permissions until it works for you:
Configure The Plugin
- In your WordPress admin, go to Settings > Thumbnail Options.
- Change the settings as desired.
NOTE: For more information on how to use WordPress, please refer to the official WordPress documentation codex which can be found at "http://codex.wordpress.org/Main_Page".
Simple Post Thumbnails Setup Instructions
WordPress 2.8 Specific
Theme Integration (REQUIRED)
You can insert the the post thumbnail wherever you want in your theme files (within the loop) such as index.php, single.php, category.php, etc...
p75GetThumbnail
p75GetThumbnail(int $post_id, [int $width, [int $height, [string $file_type]]])
This function returns the URL of the thumbnail of the post with ID of post_id.
Parameters:
-
post_id
The post ID of the post to get the thumbnail from.
-
width
The width of the thumbnail. If no width is provided, the default width as set in in the options page will be used.
-
height
The height of the thumbnail. If no height is provided, the default height as set in in the options page will be used.
-
file_type
The file type of the thumbnail. The possible values for this are "jpg", "png", and "gif". If no file type is provided, the default file type as set in in the options page will be used.
Usage:
This function is usually used inside the WordPress loop.
Use default width and height.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Some code here...
if ( p75HasThumbnail($post->ID) ) {
?>
<img src='<?php echo p75GetThumbnail($post->ID); ?>' alt='post thumbnail' />
<?php
}
// Some more code...?>
<?php endwhile; endif; ?>
Manually set the width to 200px, and height to 150px.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Some code here...?>
if ( p75HasThumbnail($post->ID) ) {
?>
<img src='<?php echo p75GetThumbnail($post->ID, 200, 150); ?>' alt='post thumbnail' />
<?php
}
// Some more code...?>
<?php endwhile; endif; ?>
Use default width and height, but set file type to PNG.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Some code here...?>
if ( p75HasThumbnail($post->ID) ) {
?>
<img src='<?php echo p75GetThumbnail($post->ID, null, null, "png"); ?>' alt='post thumbnail' />
<?php
}
// Some more code...?>
<?php endwhile; endif; ?>
p75GetOriginalImage
p75GetOriginalImage(int $post_id)
This function returns the URL of the thumbnail in its original, uncropped, and unscaled form of the post with ID of post_id.
Parameters:
Usage:
This function is usually used inside the WordPress loop.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Some code here...
if ( p75HasThumbnail($post->ID) ) {
?>
<img src='<?php echo p75GetOriginalImage($post->ID); ?>' alt='post thumbnail' />
<?php
}
// Some more code...
<?php endwhile; endif; ?>
p75HasThumbnail
p75HasThumbnail(int $post_id)
This function returns true if the post has a thumbnail associated with it and false otherwise.
Parameters:
-
post_id
The post ID of the post.
Usage:
This function is usually used inside the WordPress loop.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Some code here...
if ( p75HasThumbnail($post->ID) ) {
?>
<img src='<?php echo p75GetThumbnail($post->ID); ?>' alt='post thumbnail' />
<?php
}
// Some more code...
<?php endwhile; endif; ?>
NOTE: For more information on how to use WordPress, please refer to the official WordPress documentation codex which can be found at "http://codex.wordpress.org/Main_Page".
Simple Post Thumbnails Usage Instructions
WordPress 2.8 Specific
Adding a Post Thumbnail
The Simple Post Thumbnails WordPress plugin is very simple to use. Follow the instructions below, or watch a screencast of the plugin in action.
- Within the WordPress Administration Control Panel, expand the Posts tab, then select Add New.
- Create a title for your post and add a description about your video within the post field.
- Scroll down to the Post Thumbnail Options box.
- Paste the URL to any image on the web, or click Select Image to select the thumbnail image you wish to use for your post.
- Click Update Post to save your options and wait for the page to reload.
- After the page loads, you should see a preview of your thumbnail.
Using the Shortcode
Simple Post Thumbnails provides a shortcode so you can place the post thumbnail anywhere in your post. The format for the shortcode is:
[simple_thumbnail id="6" width="400" height="300"]
All the shortcode attributes are optional. If no id is provided, the thumbnail for the current post will be used. If the width or height is not provided, the defaults will be used. In the example above, the thumbnail from post 6 will be used with a width 400px and height of 300px.