缺少 Wordpress 主题编辑器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38426864/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wordpress Theme editor missing
提问by user3192304
I am trying to access the theme editor in Wordpress. The problem is that I cannot find the option under Admin-Appearances - Editor and when I try to access the page using the link http://www.nameofsite.com/wp-admin/theme-editor.phpI get the error : You do not have sufficient permissions to access this page.
我正在尝试访问 Wordpress 中的主题编辑器。问题是我在 Admin-Appearances - Editor 下找不到该选项,当我尝试使用链接http://www.nameofsite.com/wp-admin/theme-editor.php访问该页面时,出现错误:您没有足够的权限访问此页面。
I am logged in as an admin. Why I cant find the editor option?
我以管理员身份登录。为什么我找不到编辑器选项?
回答by Jirka ?tencek
It is probably because of iThemes Security and its settings. So yeah, just go to wp-config and change DISALLOW_FILE_EDIT to false.
这可能是因为 iThemes Security 及其设置。所以是的,只需转到 wp-config 并将 DISALLOW_FILE_EDIT 更改为 false。
define( 'DISALLOW_FILE_EDIT', false );
Or just switch it off here: Dashboard -> Security -> WordPress Tweaks -> Configure Settings
或者在这里关闭它: 仪表板 -> 安全 -> WordPress 调整 -> 配置设置
Uncheck: Disable File Editor
取消选中:禁用文件编辑器
回答by Peter
Open up your wp-config.php, search for
打开你的 wp-config.php,搜索
define('DISALLOW_FILE_EDIT', true);
change true to false
将真更改为假
define('DISALLOW_FILE_EDIT', false);
回答by Silpa
To enable theme editor follow these steps
要启用主题编辑器,请按照下列步骤操作
- Go to appearance, select one theme (any one u like) and activate it.
- In this activated theme go to appearance -> editor -> select theme to edit( on the top right, above templates. There is a drop-down click on it and select your previous theme.)
- Now select config.php or demo config.php and remove define( 'DISALLOW_FILE_EDIT, true ); code.
- Now click on update file.
- Now change theme to your previous theme.
- 转到外观,选择一个主题(您喜欢的任何一个)并激活它。
- 在此激活的主题中,转到外观 -> 编辑器 -> 选择要编辑的主题(在右上角,模板上方。有一个下拉单击它并选择您以前的主题。)
- 现在选择 config.php 或 demo config.php 并删除 define( 'DISALLOW_FILE_EDIT, true ); 代码。
- 现在点击更新文件。
- 现在将主题更改为您以前的主题。
Now you can find your editor in appearance drop-down.
现在您可以在外观下拉菜单中找到您的编辑器。
Keep smiling. Share your experience as well.
保持微笑。也分享你的经验。
回答by Tim Leon
Sucuri wp plugin will also disable the editor in its settings under the "Hardening" tab. You can click on Revert Hardening, make your changes, and then go back and apply hardening when you're finished.
Sucuri wp 插件还将在“强化”选项卡下的设置中禁用编辑器。您可以单击恢复强化,进行更改,然后在完成后返回并应用强化。
回答by Rashedul Islam Sagor
Hack :
黑客:
Manually Browse : domain.com/wp-admin/theme-editor.php
手动浏览:domain.com/wp-admin/theme-editor.php