Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress show notice only on plugin page

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 by www.wpbeginner.com #
 
PREVIOUS NEXT
Tagged: #wordpress #show #notice #plugin #page
ADD COMMENT
Topic
Name
4+4 =