[wordpress插件] WP Custom Author ImageWP自定义作者图片

wordpress 插件 文章 2020-02-23 15:40 561 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

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

用于WordPress的WP Custom Author Image插件可让您轻松地在您的网站上添加WP Custom Author Images。

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.

该插件现在支持短代码[wp-custom-author-image],您可以使用该代码直接将图像添加到页面或发布内容。

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

或者,您可以将以下调用放在希望WP Custom Author Image出现的循环中:

  <?php the_wp_custom_author_image($ author_id = null); 

?>

?>

This $author_id parameter is optional.

$ author_id参数是可选的。

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.

$ author_id参数是可选的。

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.

要配置WP自定义作者图像,请在管理区域中浏览“用户” /“您的个人资料”。

Setting WP Custom Author Image Size

设置WP自定义作者图像大小

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.

您可以在WP Custom Author Image小部件中调整实际的显示大小,也可以使用_wp_custom_author_image_size函数调用来调整。

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.
    2. 您可以使用[wp-custom-author-image]在页面/帖子内容中显示上载的WP Custom Author Image。

    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.

    通常,该窗口小部件可以清楚地标识内容的作者实际是谁时,它只会显示WP自定义作者图像。

    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.

    通常,在单击图像时,小部件将使用作者的帖子页面(/ author / authorname /)。

    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.

    在此字段中输入网址(/ about-me /)将使小部件使用此链接,而不是/ author / authorname。

    Retrieving Author Url

    检索作者网址

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

    您可以通过调用函数来检索相应的WP Custom Author Image的URL

      <?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.

    如果$ author_id为空白,则插件将尝试确定当前作者并检索其图像。

安装步骤

    1. Upload the plugin folder to the /wp-content/plugins/ directory
    2. 将插件文件夹上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Make the wp-content folder writable by your server (chmod 777)
    6. 使 wp-content 文件夹可由服务器写入(chmod 777)

下载地址
https://downloads.wordpress.org/plugin/author-image.zip
-EOF-

AI助手支持GPT4.0