How to Add Images for Your Featured Articles
By Solostream on Apr 01, 2009 with Comments 0
Step 1: Make Sure You Get the Size Correct
The ideal size for the images that appear in the Featured Articles Glider is as follows:
width: 630px
height: 250px
If you won’t be using the Featured Article Glider, and instead will be listing your featured articles separately (as they are listed on this site), the ideal size for your image is 300px wide. The height can be whatever you’d like it to be.
Step 2: Use the “Get The Image” Plugin
This plugin, created by a savvy WordPress developer named Justin Tadlock, will greatly simplify the task of placing your featured article images right where they belong.
Download the plugin here. Installation is pretty simple …
- Unzip the file.
- Upload get-the-image.php file to your wp-content/plugins folder.
- Activate the plugin on your Plugins page.
What this plugin will do:
1. It will look for any images that you’ve uploaded to your post.
2. If it finds one or more images, it will automatically place the 1st image – as a featured article image – where it belongs on your site.
Note 1: If you have uploaded multiple images to your post, it will use the #1 image as set in the gallery section of your media uploader (click thumbnail to the right).
Note 2: If you don’t want the image to appear in the post content, just don’t insert it into the post. The plugin will still grab the 1st image you’ve uploaded to the post and place it correctly.
3. If it does not find any images (because you didn’t upload any) for the post, no image will appear for that post in the Featured Article section. As for the post thumbnails, it will place a default thumbnail unless you have deactivated that feature on your Theme Settings page.
Step 3: Upload Your Image
Click the “Add an Image” button just above the post editor, and upload your image. There’s no need to insert the image within the post content unless you want to do that.
Once you upload your image, the theme will choose the first image it finds that you have uploaded and use it as the image for the Featured Article section. If you upload more than 1 image to your post, just make sure your Featured Article image is #1 image listed in the gallery (you may have to move the image up to the #1 spot).
Another Option: Use a Custom Field
Although the above method seems most simple, you may want to use the custom field method instead.
To do so, add a new custom field named: home_feature_photo
In the Value field, you’ll need to add the URL path to the image.
Example:
http://www.mysite.com/wp-content/uploads/2009/04/filename.jpg
And that’s it. The theme will do the rest.
Filed Under: A-Tutorials
About the Author: This is the Biographical Info field in the WordPress user profile. You should write something here. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quis risus at nisl blandit feugiat. Ut vel orci quis sem dapibus iaculis. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.