wordpress 展示blog标签 wordpress 标签页_wordpress 展示blog标签


wordpress标签页面

Do you want to a show a summary of your article on your homepage with a read more link? WordPress comes with two built-in methods that allows you to do that. One of these methods is known as the More Tag. In this article, we will show you how to properly use the More Tag in WordPress.

您想在首页上显示文章摘要以及更多链接吗? WordPress带有两种内置方法,可让您做到这一点。 这些方法之一被称为“ 更多标签” 。 在本文中,我们将向您展示如何在WordPress中正确使用More Tag。

(Video Tutorial)

演示地址

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

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

(Adding the More Tag in WordPress)

Adding the More Tag in your posts is quite simple. Simply start by writing a new post or edit an existing one.

在您的帖子中添加更多标签非常简单。 只需从撰写新帖子或编辑现有帖子开始。

Once you’re done writing, you will need to click on a line where you would like to end the summary and show a read more link. Next, click on the More Tag button from the toolbar.

编写完成后,您需要单击要结束摘要的行,并显示更多阅读链接。 接下来,点击工具栏中的更多标签按钮。


wordpress 展示blog标签 wordpress 标签页_python_02


You will notice that a dashed line with ‘More’ in the center will appear in your blog post. You can insert the more tag anywhere in the post, like in the mid sentence, in the middle of a paragraph, or after the first paragraph.

您会注意到,博客文章中将出现一条带有'更多'的虚线。 您可以在帖子的任何位置插入more标签,例如在句子中间,段落中间或第一段之后。

If you are using the text editor, then you can use the ‘more’ button in the toolbar or manually enter the more tag like this:

如果您使用的是文本编辑器,则可以使用工具栏中的“更多”按钮或手动输入更多标签,如下所示:

<!--more-->

<!--more-->

(What’s the Advantage of using More Tag vs Excerpts)

Remember earlier we mentioned that WordPress comes with two built-in methods for showing the post summary with read more link. Those methods are More Tag and Excerpts.

记得之前我们提到过WordPress带有两种内置方法,用于显示带有更多链接的帖子摘要。 这些方法是“更多标签”和“ 摘录”

You can add an excerpt for any post using the Excerpt box in your post editor screen. If you do not see that box, then click on the screen options tab on the top right hand corner and check the excerpt option.

您可以使用帖子编辑器屏幕中的摘录框为任何帖子添加摘录。 如果您没有看到该框,请单击右上角的屏幕选项选项卡,然后选中摘录选项。

This will display an excerpt meta box below your post editor.

这将在您的帖子编辑器下方显示一个摘录元框。


wordpress 展示blog标签 wordpress 标签页_wordpress 展示blog标签_03


While excerpts may sound like an easier option, there are two downsides to using an excerpt.

虽然摘录听起来像是一个更简单的选择,但是使用摘录有两个缺点。

The first is that excerpts are completely theme dependent. If your theme does not use the_excerpt tag, then no matter what you type in the excerpt box, your theme will show the full content of your post on your homepage and archive pages.

首先是摘录完全取决于主题。 如果主题不使用the_excerpt标记,则无论您在摘录框中键入什么内容,主题都将在您的主页和存档页面上显示帖子的完整内容。

The second downside to using excerpts is that they do not show images or any other formatting for that matter. They’re displayed as plain text.

使用摘录的第二个缺点是,它们没有显示图像或其他任何格式。 它们显示为纯文本。

Whereas the More Tag is completely theme independent meaning it will work on all well-coded WordPress themes. Second, it allows you to display images and all post formatting such as links, quotes, bold/italics, etc in your post summary.

而“更多标签”完全独立于主题,这意味着它可以在所有编码良好的WordPress主题上使用。 其次,它允许您在帖子摘要中显示图像和所有帖子格式,例如链接,引号,粗体/斜体等。

(What’s the Downside of using More Tag)

The biggest downside of using the WordPress More Tag is that it is something you have to manually enter in all of your posts whereas excerpts are automated.

使用WordPress More标签的最大缺点是,您必须在所有帖子中手动输入内容,而摘录是自动的。

While WordPress allows you to enter a custom excerpts in the excerpt box, it can also auto-generate an excerpt based on your character count.

尽管WordPress允许您在摘录框中输入自定义摘录,但它还可以根据您的字符数自动生成摘录。

Depending on your preference, this may be a downside.

根据您的喜好,这可能是不利的一面。

The other downside of using a More Tag is if you use a theme that uses excerpts, then it will override the More Tag and provide an excerpt with the length defined by your theme.

使用“更多标签”的另一个缺点是,如果您使用的是使用摘录的主题,则它将覆盖“更多标签”,并提供一个由您的主题定义的长度的摘录。

Whether you use More Tag or excerpts, it’s important that you show a summary on your homepage and archive pages rather than showing full content. See our article on the topic, full Text vs summary (excerpt) in your WordPress archive pages.

无论您使用More Tag还是摘录,在首页和存档页面上显示摘要而不是显示全部内容都非常重要。 请参阅WordPress存档页面中有关主题的全文与摘要(摘录)

(Common WordPress More Tag Problems)

The biggest issue we hear with WordPress More Tag not working is when it comes to pages.

我们听到的WordPress More Tag不起作用的最大问题是页面。

By default, you cannot use the More Tag in WordPress pages. However, there is a quick fix that allows you to add read more tag in WordPress pages.

默认情况下,您不能在WordPress页面中使用“更多标签”。 但是,有一个快速修复程序,可让您在WordPress页面中添加阅读更多标签

Another common issue is more tag not working on homepage. If you are using a static page as your custom homepage, then the link above should fix the issue.

另一个常见问题是更多标签无法在首页上运行。 如果您使用静态页面作为自定义首页 ,则上面的链接应该可以解决该问题。

The only other reason why more tag won’t work on the homepage is if your theme is designed to show excerpts on the front page in which case your more tag is being overridden, and you should use excerpts instead.

其他标签无法在首页上运行的唯一其他原因是,如果您的主题旨在在首页上显示摘录,在这种情况下,您的更多标签将被覆盖,而应改用摘录。

We hope this article helped you learn how to properly use the more tag in WordPress. You may also want to check out our CSS Hero, a WordPress plugin that helps make design customization easy – see our full CSS Hero review.

我们希望本文能帮助您学习如何在WordPress中正确使用more标记。 您可能还需要查看我们的CSS Hero ,这是一个WordPress插件,可帮助简化设计定制工作-请参阅我们完整的CSS Hero评论

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/beginners-guide/how-to-properly-use-the-more-tag-in-wordpress/

wordpress标签页面