Wordpress Show Notice Only On Plugin Page

[Solved] Wordpress Show Notice Only On Plugin Page | Php - Code Explorer | yomemimo.com
Question : wordpress show notice only on plugin page

Answered by : lokesh-kumar-suman

function general_admin_notice(){
    global $pagenow;
    if ( $pagenow == 'options-general.php' ) {
         echo '<div class="notice notice-warning is-dismissible">
             <p>This notice appears on the settings page.</p>
         </div>';
    }
}
add_action('admin_notices', 'general_admin_notice');

Source : https://www.wpbeginner.com/wp-tutorials/how-to-add-admin-notices-in-wordpress/ | Last Update : Fri, 16 Apr 21

Answers related to wordpress show notice only on plugin page

Code Explorer Popular Question For Php