Showcasing your recently published content is one of the most simple ways of improving almost every website performance metrics. The good thing to know is that you can display your recently published content in high-traffic areas such as sidebars, after the posts and the footer. This makes sure that you give maximum visibility to your […]
Display
如何在WordPress中轻松显示类别描述
“如何在 WordPress 中显示类别描述”肯定是最罕见的 WordPress 查询之一。 目录 为什么在 WordPress 中显示类别描述 显示帖子的类别描述 简码放置 类别是一个常见但被忽视的 WordPress 功能。尽管它们已经存在很长时间了,但许多用户仍然没有正确使用它们。 为什么在 WordPress 中显示类别描述 用户在起草博客时忽略 WordPress 显示类别的一个重要原因是,一般情况下,类别中不会出现任何说明。因此,用户经常会跳过这一重要步骤。 类别允许您对网站上的内容进行排序和查找。它们也有利于您网站的搜索引擎优化。在本文中,我将带您完成在 WordPress 中显示类别描述的过程。 显示帖子的类别描述 在 WordPress 中添加类别描述的过程很简单。首先转到帖子>>类别。 现在,转到主题的文件夹并打开archive.php 。将以下代码添加到文件中: <?phpthe_archive_description( '<div class="taxonomy-description">', '</div>' );?> 123 <?php the_archive_description ( '<div class="taxonomy-description">' , '</div>' ) ; ?> 现在,当您希望显示 WordPress 类别描述时,只需使用以下代码片段: <?php echocategory_description( $category_id ); ?> 1 <?php […]

