November 5

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

Good luck.


add, message.notice, saved, settings, wordpress

You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get in touch

0 of 350