theme mod disalow wp

To disable the WordPress theme modification (wp_mod), follow these steps:

  1. Access the WordPress theme files: Log in to your WordPress admin panel and go to the Appearance section. Select the Theme Editor option. This will open the theme files in the WordPress editor.

  2. Locate the functions.php file: In the Theme Editor, you will see a list of theme files on the right side. Look for the functions.php file and click on it to open it for editing.

  3. Add the code to disable theme modification: Inside the functions.php file, add the following code snippet at the end of the file:

// Disable theme modification
add_filter('wp_revisions_to_keep', function ($num, $post) {
    return ($post->post_type == 'revision') ? 0 : $num;
}, 10, 2);
  1. Save the changes: After adding the code snippet, click on the "Update File" button to save the changes you made to the functions.php file.

By following these steps, you have successfully disabled the WordPress theme modification. This code snippet filters the revisions to keep for each post and sets the number to 0 for revisions, effectively disabling theme modification.