Skip to content Skip to sidebar Skip to footer

How to add the wordpress settings saved message to plugins

If you are a wordpress developer and you code plugins that have variable settings inserted with register_setting() function into the database, then you must also add a notice to inform users when specific options or settings are saved. In order to do that, you’ll just need to add the following code snippet, anywhere in your form:

<?php if( isset($_GET[‘settings-updated’]) ) { ?>
<div id=”message” class=”updated”>
<p><strong><?php _e(‘Settings saved.’) ?></strong></p>
<?php } ?>

Good luck.

What's your reaction?

1 comment

  • Escha
    Posted January 25, 2019 2:53 pm 0Likes

    Thank you! I’ve been looking for this little snippet for hours. Perfect.

Leave a comment