WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Post Avatar

Choose an avatar from a pre-defined list to include in a post.

  1. Download the plugin.
  2. Unzip.
  3. Upload "post-avatar" directory to your plugin folder (/wp-content/plugins).
  4. Activate the plugin from the Plugin Management screen.
  5. Set plugin options in Settings - Post Avatar.

    • Path to Images Folder - location of your images folder in relation to your WordPress installation.

    • Scan the images directory and its sub-directories - Place a tick mark if you want to list all images including those in sub-directories of the image folder.

    • Show avatar in post - Place a tick mark to show avatar automatically on your blog post. Disable to use the template tag.

    These options help you further customize the display of your post avatar

    • Customize HTML/CSS - These options help you customize the look of your post avatar
    1. 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://mydomain.com/images/image.jpg" style="border:0" alt="post-title" /></div>

    2. 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://mydomain.com/images/image.jpg" style="border:0" 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://mydomain.com/images/image.jpg" style="border:0" alt="post-title" /></div>

    • Others
    1. Get image size? - Turned on by default to determine the image's width and height. If you encounter any getimagesize errors, turn this feature off.

    2. Show in feeds? - Turned off by default. Check this option to display post avatars in your RSS feeds.

Usage

A. UPLOAD IMAGES

Upload the images that you intend to use to the folder defined in the Post Avatar options.

B. ADDING AN AVATAR TO A POST

  1. To add an image to a post, go to the Post Avatar section. The image selector is below the Excerpt but you can move it to a different location.

  2. Select the image name from the list.

  3. Save your entry.

For Theme Developers

For improved integration with third-party WordPress themes, Post Avatar has two additional tags to help producing custom output in additional functions.

**OVERRIDE AUTOMATIC DISPLAY OF POST AVATARS

To override the option to display avatars automatically, use remove_filter() like so:

remove_filter('the_content', 'gkl_postavatar_filter', 99 );
remove_filter('the_excerpt', 'gkl_postavatar_filter', 99 );

**CUSTOM OUTPUT

To produce your own output with post avatar data, use the function: <?php gkl_get_postavatar(); ?> This lets you create a array containing the url to the avatar, image height and width, post title, post id and boolean value to let you know if the getimagesize option has been turned on or not.

Please visit the Post Avatar Page for details on customizing the avatar display.

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-2-4
Downloads: 79,806

Ratings

3 stars
3.8 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,1,1
0,1,0
33,3,1
100,1,1 100,1,1
100,1,1
100,4,4
100,1,1
50,2,1
50,2,1
100,1,1