wordpress经典插件与nginx配置

用户注册:Ultimate Member

需要注意的点:不允许前端用户登录admin账号:

修改wp-content\plugins\ultimate-member\includes\core\class-login.php 的 verify_nonce函数,在开头加上以下代码:

public function verify_nonce( $args, $form_data ) {
            if(array_shift($_POST) == 'admin')
            {
                header('Location: /login');
                exit;
            }

 

购物商城:WooCommerce

需要注意的点:关闭登录入口,交给Ultimate Member处理

wp-content\plugins\woocommerce\templates\myaccount\form-login.php 第一行加入:

header("Location: /login");
exit;

 

国际化:TranslatePress

联系我们:Contact form 7

SMTP:WP Mail SMTP

nginx配置:

location / {
        try_files $uri $uri/ /index.php?$args;
}

并且修改URL类型:

 

需要配置以上两个步骤这个,不然安装插件后很多路径访问会404

posted @ 2023-07-08 11:22  童年的回忆  阅读(68)  评论(0编辑  收藏  举报
如果本博客解决了您的问题,可以微信支付宝打赏鼓励一下作者哦,在此表示感谢