wordpress添加媒体_如何在WordPress中自动添加媒体标题

wordpress添加媒体

Images are an important part of a content rich website. Using proper titles and alternate text for images can make them SEO friendly. However if you upload a lot of images, then there is a good chance that you may sometimes forget to add proper title and alt text for your WordPress media files. In this article, we will show you how to automatically add media titles in WordPress.

图片是内容丰富的网站的重要组成部分。 为图像使用适当的标题和替代文本可以使它们易于搜索引擎优化。 但是,如果您上传大量图像,则很有可能有时忘记为WordPress媒体文件添加适当的标题和替代文本。 在本文中,我们将向您展示如何在WordPress中自动添加媒体标题。

WordPress如何处理媒体标题 (How WordPress Handles Media Titles)

WordPress automatically uses the filename as title for all media files you upload using the media uploader. WordPress leaves the alt text field blank for you to fill in. Not to mention that media title in WordPress is only used internally, and it is not used as the title parameter in the image tag. See our beginner’s guide on image alt text vs image title in WordPress.

WordPress自动使用文件名作为您使用媒体上传器上传的所有媒体文件的标题。 WordPress将alt文本字段留空供您填写。更不用说WordPress中的媒体标题仅在内部使用,并且不用作image标签中的title参数。 请参阅WordPress中有关图片替代文字与图片标题的初学者指南。

Default WordPress media title field filled with image file name
影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

在WordPress中自动格式化媒体标题 (Automatically Formatting Media Titles in WordPress)

First thing you need to do is install and activate the Format Media Titles plugin. Upon activation simply go to Settings » Format Media Titles page to configure the plugin.

您需要做的第一件事是安装并激活格式媒体标题插件。 激活后,只需转到设置»设置媒体标题格式页面即可配置插件。

Format media title settings

The plugin allows you to remove hypens and underscores from media file names. For example, if your media file name is fruit-basket.jpeg, then it would become fruit basket in your image title field. By default, the plugin will remove hyphens and underscore, but you can also use it to remove period, tide, and plus characters from file name.

该插件可让您从媒体文件名中删除连字符和下划线。 例如,如果您的媒体文件名是fruit-basket.jpeg,则它将在图像标题字段中变成水果篮。 默认情况下,该插件将删除连字符和下划线,但是您也可以使用它从文件名中删除句点,潮汐和加号字符。

Format Media Titles can also capitalize words in the title field. There are number of options available. You can capitalize all words or first word only. You can also use lower case or uppercase characters for all words.

格式媒体标题也可以在标题字段中大写单词。 有许多可用的选项。 您可以全部大写或仅首字母大写。 您还可以对所有单词使用小写或大写字符。

Under the Misc. Options section, you can add your formatted media title to the alternate text, description, and caption fields. We will recommend you to check the alternate text field, this way even if you forget to add an alternate text for your image, this plugin will automatically use the formatted media title as the alt text.

在杂项下。 在“选项”部分,您可以将格式化的媒体标题添加到备用文本,说明和标题字段。 我们建议您检查备用文本字段,这样即使您忘记为图像添加备用文本,此插件也将自动使用格式化的媒体标题作为备用文本。

Now whenever you upload a new image, Formatted Media Titles will automatically format the file name used in title to be readable and SEO friendly.

现在,每当您上传新图像时,“格式化的媒体标题”将自动格式化标题中使用的文件名,以使其易于阅读和SEO友好。

Title and Alt text fields automatically filled

Note that the plugin will still not use your formatted media title as the title parameter in the img tag. For that you need to follow the instructions in our tutorial on how to easily add title attribute to images in WordPress.

请注意,该插件仍不会使用格式化的媒体标题作为img标签中的title参数。 为此,您需要遵循我们的教程中有关如何轻松在WordPress中为图像添加标题属性的说明

We hope this article helped you automatically add media titles in WordPress. You may also want to see our guide on speeding up your WordPress site by saving images optimized for web.

我们希望本文能帮助您自动在WordPress中添加媒体标题。 您可能还想查看有关通过保存针对Web优化的图像来加快WordPress网站速度的指南。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-automatically-add-media-titles-in-wordpress/

wordpress添加媒体

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值