Support

Account

Home Forums Feature Requests Hide attachment fields

Solved

Hide attachment fields

  • Hi Elliot, I am sure I am not the first one asking this, but I couldn’t find this request on your site.

    I would be king some options to hide the Caption, Alt and Description fields on the Attachment edit pages. Specially the popup that open using the ACF Gallery field.

    Here is a screenshot just to illustrate:
    Feature request

    • James

    • February 4, 2014 at 10:00 am

    Hi @andrefelipe,

    Thankyou for your request! It has been added to a report for Elliots attention

    Have a nice day

  • Thanks a lot guys! I can’t develop on WordPress without ACF anymore.

    Best luck on ACF 5. Please know you can feel free to charge considerable money for it, I am one that would gladly pay.

    • ColinF

    • January 20, 2017 at 2:46 pm

    Any developments on this? I’ve been using this code to do this on the other 2 media input templates:
    http://stackoverflow.com/questions/25894288/wordpress-remove-attachment-fields
    … but I’m using the ACF Gallery interface and would like to make it consistent. Unless I’m missing something (quite possible), there doesn’t appear to be an easy way to id and hide these with css, either.

  • I would like to know this as well. I have added some custom fields to attachments and it would be very nice to remove the caption, alt and description fields.

    Any updates on this?

  • I ended up by just hiding the fields with CSS.

    Add this to your functions.php to add a custom stylesheet for WP-Admin.

     
    function load_admin_style() {
    	wp_register_style( 'admin_css', get_template_directory_uri() . '/admin-style.css', false, '1.0.0' );
    	wp_enqueue_style( 'admin_css');
    }
    
    add_action( 'admin_enqueue_scripts', 'load_admin_style' );

    Then create a new admin-style.css file in your theme directory. In this file you can hide the fields you want to hide. In my case it was the alt, caption and description tags in the sidebar of a gallery.

    .acf-gallery-side .acf-field[data-name="alt"] {
    	display: none;
    }
    
    .acf-gallery-side .acf-field[data-name="caption"] {
    	display: none;
    }
    
    .acf-gallery-side .acf-field[data-name="description"] {
    	display: none;
    }
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.