Support

Account

Home Forums Backend Issues (wp-admin) How to change “Add to Gallery” button text? Reply To: How to change “Add to Gallery” button text?

  • With the help of ACF support and a friend, we came up with how to do this in functions.php

    // Change ACF Gallery Button Text
    
    function my_acf_input_admin_footer()
    {
    
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function(){
    	acf.add_action('load', function( $el ){
            jQuery(".acf-block-body .acf-button.acf-gallery-add").each(function(index) {
                this.innerText = "Add Images";
            });
    	});
    	acf.add_action('append', function( $el ){
            jQuery(".acf-block-body .acf-button.acf-gallery-add").each(function(index) {
                this.innerText = "Add Images";
            });
    	});
    });
    </script>
    <?php
    
    }
    
    add_action('acf/input/admin_footer', 'my_acf_input_admin_footer');