Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
Last active February 17, 2021 03:36
Show Gist options
  • Select an option

  • Save frankyonnetti/5944795 to your computer and use it in GitHub Desktop.

Select an option

Save frankyonnetti/5944795 to your computer and use it in GitHub Desktop.
Drupal 6 - remove homepage field #drupal #d6
/**
* First register the override in your template.php file (my example uses a zen subtheme)
* http://drupal.org/node/147502#comment-1654954
*/
<?php
/**
* Implementation of zen HOOK_theme().
*/
function YOUR-THEME-NAME_theme(&$existing, $type, $theme, $path) {
$hooks = zen_theme($existing, $type, $theme, $path);
$hooks['comment_form'] = array('arguments' => array('form' => NULL));
return $hooks;
}
?>
/**
* Then, create a function specific for the comment form in your theme (also in template.php), with code to suppress the homepage field:
*/
<?php
function YOUR-THEME-NAME_comment_form($form) {
$output = '';
unset ($form['homepage']);
$output .= drupal_render($form);
return $output;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment