How can I hide revision information on node forms? Trying to figure out how to hide revision information from node form. When users create a node, they see revision info at the bottom which confuses them.
I can't seem to disable revision info from the content type edit settings since there are nodes already. So the only solution is to hide it.
The way that I am going is by trying to add this:
$form['revision_information']['#access'] = false;

My question is how can I add that to my theme-name.theme file?
The content type is QUESTIONS
Please try below code in your theme-name.theme file.

/**
 * Implements hook_form_alter().
 */
function THEMENAME_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  $form['revision_information']['#access'] = FALSE;
}