Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Gallery Settings section removing WordPress


When you add 2 or more images, you are starting to see gallery settings section on gallery tab.

Normally its in wp-admin/includes/media.php 1704 line;
<div id="gallery-settings" style="display:none;">
<div class="title"><?php _e('Gallery Settings'); ?></div>
<table id="basic" class="describe"><tbody>
<th scope="row" class="label">

When adding 2 or more images, wordpress removing <strong>display:none;</strong> codes from this place i think, but i couldnt find how its removing those codes.

I want to remove this section always, even have 2 or more images. How can i do that? How can i add or remove html codes in wordpress panel like <strong>style="display:none;"</strong> section

Answers (2)


Utkarsh Kukreti answers:

Add this code to your functions.php
function hide_gallery_settings()
echo '<style type="text/css">#gallery-settings{display:none;}</style>';

add_action('admin_print_styles', 'hide_gallery_settings');


Michael Fields answers:

add_action( 'admin_head_media_upload_gallery_form', 'mfields_remove_gallery_setting_div' );
if( !function_exists( 'mfields_remove_gallery_setting_div' ) ) {
function mfields_remove_gallery_setting_div() {
print <<<EOF
<style type="text/css">
#gallery-settings *{