WordPress 登录可见评论代码
打开主题正文模板文件single.php,找到类似的: if ( comments_open() || get_comments_number() ) : comments_template(); endif; 修改为 if ( is_us...
打开主题正文模板文件single.php,找到类似的: if ( comments_open() || get_comments_number() ) : comments_template(); endif; 修改为 if ( is_us...
把下面的代码,复制到当前主题函数模板 functions.php 中。 function ecp_save_post($post_id, $post) { global $wpdb; if($post->post_status == 'p...
把下面代码复制到当前主题的 function.php 文件中 //禁用WordPress前台搜索功能 function disable_search( $query, $error = true ) { if (is_search...
WordPress纯代码判断当前文章是否被百度收录方法: 把以下代码添加至当前主题的 functions.php 中 //判断文章是否被百度收录 function baidu_check($url){ ...
WordPress 通过JS判断用户来路,实现页面跳转方法: 在使用WORDPRESS在发布文章的时候,可以将以下代码直接粘贴到编辑器的【文本】模式,并将其中的域名部分...
WordPress 实现隐藏加密文章部分内容,把下面的代码复制到当前主题的 functions.php 文件中。 // 输入密码查看文章内容 function password_protected_post($...
把下面的代码复制到当前主题的 functions.php 文件中。 //外链图片自动保存到本地 add_filter('content_save_pre', 'auto_save_image'); function ...
操作前请先备份WordPress的SQL数据,wp_是WordPress的数据库默认前缀,根据安装时修改。 删除WordPress自定义字段 DELETE FROM wp_postmeta WHERE meta_key =...
WordPress历史版本官方下载地址规律是https://wordpress.org/wordpress-版本.zip 像5.5.1版本地址的就是https://wordpress.org/wordpress-5.5.1.zip 5.5 Bran...
方法一:Nginx屏蔽xmlrpc.php文件的访问,在对应的主机配置文件中添加 location ~* /xmlrpc.php { deny all; } 方法二:屏蔽 XML-RPC (pingback) 的...