A WordPress plugin simplifies the process of including a picture when writing posts. Authors simply choose from a predefined list of images in the Write Post page to display an image in a post. A template tag displays the image with The Loop. This plugin is similar to Livejournal userpics.
Post Avatar was a finalist at The 2007 Philippine Blog Awards for Best Plugin/Extension.
- Easy selection of images in the Write Post screen.
- Scans images in sub-directories of the image option folder.
- Allows the following file types: .jpg, .jpeg, .gif and .png.
- Show avatar automatically in blog or use a template tag to display in themes.
- Does not display missing images.
- After downloading the zip file from WordPress.org, extract the zip file onto your computer. This will create a folder `post-avatar` containing the plugin files.
- Connect to your webserver and upload the `post-avatar` folder to where your plugins are installed, typically, `/wp-content/plugins`.
- To activate the plugin go to the Plugins menu in your WordPress installation’s admin area. Click “Activate” for the “Post Avatar” plugin
- From the Plugins menu, click Add New and search for Post Avatar
- Click “Install Now” so that WordPress will download and install the plugin
- Once the installation is complete, you will be asked to click “Activate Plugin“
The plugin sets default options during the activation process. To change these settings go to the Settings menu in your WordPress installation’s admin area. Choose the Post Avatar link.
- Path to Images Folder – location of your images folder in relation to your WordPress installation.
- Show avatar in post? Disable to use template tag. – A tick mark here will display the avatar on your site. If you want to customize the avatar HTML, un-tick this setting and use the template tag gkl_postavatar() or custom filters.
- Scan the images directory and its sub-directories – Tick this to include images stored in sub-directories of the images folder in the avatar selection.
- Get image dimensions? Disable this feature if you encounter getimagesize errors – Turned on by default, a tick mark here will determine the image’s width and height. If you encounter any getimagesize errors, turn this feature off.
- Show post avatars in RSS feeds? – Turned off by default, place a tick mark here to include avatars in your RSS feeds.
These options help you further customize the display of your post avatar
- Before and After HTML – enter the HTML you want to display before and after the post avatar.
Example: Before: <div class=”myimage”> / After: </div>
Output: <div class=”myimage”><img src=”http://wplatest.dev/icons/image.jpg” alt=”post-title” /></div>
- CSS Class – enter the name of the css class that you would like to associate with the post avatar image. Can be left blank.
Example: The class name is: postimage
Output: <img class=”postimage” src=”http://wplatest.dev/icons/image.jpg” alt=”post-title” />
If you use both the css class and the before and after html you will get the following output:
<div class=”myimage”><img class=”postimage” src=”http://wplatest.dev/icons/image.jpg” alt=”post-title” /></div>