• Resolved David Gewirtz

    (@dgewirtz)


    I’m using this code to remove the default button, but it sometimes causes a “headers already sent” error. Is there a better way to accomplish the same task?

    function seamless_donations_cmb2_remove_primary_save_button() {
         ?>
         <style type="text/css" media="screen">
             input#submit-cmb.button.button-primary {display: none;}
         </style>
         <?php
    }
Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    What are you attaching this seamless_donations_cmb2_remove_primary_save_button() function to? init ? Something else? Looks like it’d be most appropriate on the wp_head hook as that wouldn’t start till well after when that error type should occur.

Viewing 1 replies (of 1 total)

The topic ‘Removing default button’ is closed to new replies.