• The theme file editor option is missing from Appearance. At first, it was there and when I clicked on it, it gave me a message that you are not allowed to edit this file although I am the manager. I went back to the link right after and it was gone.

    This is what I see under the Theme File Editor file under WP Manager : file:///C:/Users/cspar/Downloads/theme-editor.php#:~:text=if%20(%20!%20current_user_can(%20%27edit_themes%27%20)%20)%20%7B%0A%09wp_die(%20%27%3Cp%3E%27%20.%20__(%20%27Sorry%2C%20you%20are%20not%20allowed%20to%20edit%20templates%20for%20this%20site.%27%20)%20.%20%27%3C/p%3E%27%20)%3B%0A%7D

    if ( ! current_user_can( ‘edit_themes’ ) ) {
    wp_die( ‘

    ‘ . __( ‘Sorry, you are not allowed to edit templates for this site.’ ) . ” );
    }

    Please advise.

    • This topic was modified 1 year, 8 months ago by ecoachable. Reason: Added error message

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • hi @wbcilearn

    first check you have any active theme, if yes, then disable all plugins and check again the “theme editor”.

    if still, you getting the same error then go to your server or cpanel, open the root directory where your WordPress files are, then find and edit the “wp-config.php” file.

    Next, within the Code Editor field locate the following line: “define(‘DISALLOW_FILE_EDIT’, true)“. Once located, simply?change the text line “true” to “false”?and click?Save & Close.

    hope it will help you to sort out your issue

Viewing 1 replies (of 1 total)
  • The topic ‘Theme File Editor’ is closed to new replies.