WordPress 4.3以上版本默认开启页面的评论功能

前端之家收集整理的这篇文章主要介绍了WordPress 4.3以上版本默认开启页面的评论功能前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

使用的过程中,我们发现WordPress 4.3以及后续版本在默认情况下将页面(page)的评论功能关闭了,这意味着,你如果新建一个页面,需要手动勾选”允许评论”才可以开启页面的评论功能,这个对于那些经常要发布可以评论页面的用户来说,增加了不少工作量。如下图:

page-comment

如果你想要默认情况下开启页面评论功能,可以下载安装wordpress.org/plugins/allow-comments-on-pages-by-default/" target="_blank" rel="nofollow"> Allow Comments on Pages by Default 插件,或者切换到主题目录,将下面的代码添加主题的 functions.PHP文件中:

Crayon-5c891ce549d82716028526" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">