Title: WP Custom Author Image
Author: p4wparamjeet
Published: <strong>2018 年 12 月 17 日</strong>
Last modified: 2019 年 8 月 27 日

---

搜索插件

![](https://ps.w.org/author-image/assets/banner-772x250.jpg?rev=2143647)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/author-image/assets/icon-256x256.jpg?rev=2143647)

# WP Custom Author Image

 作者：[p4wparamjeet](https://profiles.wordpress.org/p4wparamjeet/)

[下载](https://downloads.wordpress.org/plugin/author-image.zip)

 * [详情](https://cn.wordpress.org/plugins/author-image/#description)
 * [评价](https://cn.wordpress.org/plugins/author-image/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/author-image/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/author-image/#developers)

 [支持](https://wordpress.org/support/plugin/author-image/)

## 描述

The WP Custom Author Image plugin for WordPress lets you easily add WP Custom Author
Images on your site.

It creates a widget that you can insert in a sidebar or any other widget area allowed
by your theme.
 The plugin now supports a short code [wp-custom-author-image] you
can use to directly add the image to the page or post content.

Alternatively, you can place the following call in the loop where you want the WP
Custom Author Image to appear:

    ```
    <?php the_wp_custom_author_image($author_id = null); ?>

    This $author_id parameter is optional.  If it is not passed in, the code will attempt to get the current author of the page/post.
    ```

A second version of this function exists whereby you can pass in width and height
to display the image.

    ```
    <?php the_wp_custom_author_image_size($width, $height, $author_id = null); ?>

    This $author_id parameter is optional.  If it is not passed in, the code will attempt to get the current author of the page/post.
    ```

To configure your WP Custom Author Image, browse Users / Your Profile in the admin
area.

#### Setting WP Custom Author Image Size

You can adjust the actual display size in the WP Custom Author Image widget or by
using the_wp_custom_author_image_size function call.

If you do not specify a size the width and height of the actual image will be used.

#### Shortcode

 1. You can use [wp-custom-author-image] to display the uploaded WP Custom Author Image
    in your page/post content.

#### Multi-Author Sites

For sites with multitudes of authors, the widget offers the ability to insert a 
link to the author’s posts — his archives.

#### Single Author Sites

Normally the widget will only display an WP Custom Author Image when it can clearly
identify who the content’s author actually is. In other words, on singular pages
or in the loop.

If you run a single author site, or a site with multiple ghost writers, be sure 
to check the “This site has a single author” option. The widget will then output
your image at all times.

#### Alternate About Page Link

Normally the widget will use the author’s posts page (/author/authorname/) is the
image is clicked on. If your site has a dedicated page for the author, such as an‘
About Me’ page,

there is a new field in ‘Your Profile’ called ‘About Me Page’. Entering a url in
this field (/about-me/) will cause the widget to use this link as opposed to /author/
authorname.

#### Retrieving Author Url

You can retrieve the url to the respective WP Custom Author Image by calling the
function

    ```
    <?php the_wp_custom_author_image_url($author_id = null); ?>
    ```

If $author_id is blank the plugin will attempt to determine the current author and
retrieve his/her image.

## 屏幕截图

 * [[
 * After activate this plugin go to plugin settings by click on “Users”. You can
   also find the plugin settings by ‘Users > Your Profile’ menu in your WordPress
   backend like as above screen.
 * [[
 * You can use [wp-custom-author-image] to display the uploaded WP Custom Author
   Image in your page/post content.

## 安装

 1. Upload the plugin folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Make the `wp-content` folder writable by your server (chmod 777)

## 常见问题

  Image Style

You can use the `.entry_wp_custom_author_image` CSS class to customize where and
how the image appears.

For instance:

    ```
    .entry_wp_custom_author_image {
      float: left;
      border: solid 1px outset;
      margin: 1.2em 1.2em 0px .1em;
    }
    ```

  Overriding CSS Floats

When displaying wide videos, images or tabular data, it becomes desirable to bump
the content below the author’s image. To achieve this, insert the following code
in your post:

    ```
    <div style="clear:both;"></div>
    ```

  Set Uploaded Image Max Width and Height

Two constants can be set in your `wp-config.php` file to set the max size of the
uploaded image. These values are in pixels.

    ```
    define('wp_custom_wp_custom_author_image_WIDTH', 100);
    define('wp_custom_wp_custom_author_image_HEIGHT', 120);
    ```

The default values for these settings are 250 x 250.

  Can I Make changes to the Author’s Bio Before it is Displayed

There is a filter called wp_custom_author_image_bio that can be used to modify the
bio text.

  Nothing is Displaying

More than likely you have place the the_wp_custom_author_image function call outside
of your template’s posts loop so the author cannot be determined. Trying passing
in an author id directly.

## 评价

![](https://secure.gravatar.com/avatar/71e259f356434ec5eec9d9f74c619a42a62e0bed3a75f84350245ba05747a03f?
s=60&d=retro&r=g)

### 󠀁[No Other Choice!](https://wordpress.org/support/topic/no-other-choice-2/)󠁿

 [pawan99saini](https://profiles.wordpress.org/pawan99saini/) 2019 年 8 月 26 日

This better be kept up to date.

![](https://secure.gravatar.com/avatar/8eecd783816a045e418749f2e5215c087f0bc50db9362af24d1404549c858e05?
s=60&d=retro&r=g)

### 󠀁[Works Great for Author Image](https://wordpress.org/support/topic/works-great-for-author-image/)󠁿

 [ankurnama007](https://profiles.wordpress.org/ankurnama007/) 2019 年 4 月 18 日

worth it and satisfy me

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/author-image/reviews/)

## 贡献者及开发者

「WP Custom Author Image」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ p4wparamjeet ](https://profiles.wordpress.org/p4wparamjeet/)

[帮助将「WP Custom Author Image」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/author-image)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/author-image/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/author-image/)，或通过[RSS](https://plugins.trac.wordpress.org/log/author-image/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/author-image/)。

## 额外信息

 *  版本 **1.0**
 *  最后更新：**7 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 3.1 或更高版本 **
 *  已测试的最高版本为 **5.2.24**
 *  语言
 * [English (US)](https://wordpress.org/plugins/author-image/)
 * 标签
 * [author](https://cn.wordpress.org/plugins/tags/author/)[user photo](https://cn.wordpress.org/plugins/tags/user-photo/)
 *  [高级视图](https://cn.wordpress.org/plugins/author-image/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/author-image/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/author-image/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/author-image/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/author-image/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/author-image/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/author-image/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/author-image/reviews/)

## 贡献者

 *   [ p4wparamjeet ](https://profiles.wordpress.org/p4wparamjeet/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/author-image/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://paypal.me/paramjeetkumawat)