Skip to content

Instantly share code, notes, and snippets.

@robertdevore
Created September 28, 2015 12:59
Show Gist options
  • Save robertdevore/3d0f66213fd80424b427 to your computer and use it in GitHub Desktop.
Save robertdevore/3d0f66213fd80424b427 to your computer and use it in GitHub Desktop.
WordPress function to add a notice bar to the admin screen
<?php
function devio_functionname() {
if ( is_admin() && current_user_can( 'manage_options' ) ) {
echo '<div class="updated" id="message"><p>Put your notice here</p></div>';
}
}
add_action( 'admin_notices', 'devio_functionname' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment