wordpress show notice only on plugin page

Solutions on MaxInterview for wordpress show notice only on plugin page by the best coders in the world

showing results for - "wordpress show notice only on plugin page"
Fenton
23 Sep 2017
1function general_admin_notice(){
2    global $pagenow;
3    if ( $pagenow == 'options-general.php' ) {
4         echo '<div class="notice notice-warning is-dismissible">
5             <p>This notice appears on the settings page.</p>
6         </div>';
7    }
8}
9add_action('admin_notices', 'general_admin_notice');
10