Skip to content

Instantly share code, notes, and snippets.

@pinalj
Last active November 3, 2017 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinalj/750669a0bffbd0cd6614c818c7aa0fdf to your computer and use it in GitHub Desktop.
Save pinalj/750669a0bffbd0cd6614c818c7aa0fdf to your computer and use it in GitHub Desktop.
Adding an error notice
<?php
add_action( 'admin_notices', 'my_error_notice' );
function my_error_notice() {
?>
<div class="notice notice-error">
<p><?php _e( 'There has been an error.', 'my-text-domain' );?></p>
</div>
<?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment