RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.20% (5.24%*) • Home Loan Fixed: 5.48% (6.24%*) • Fixed: 5.48% (6.24%*) • Variable: 5.20% (5.24%*) • Investment IO: 5.74% (6.40%*) • Investment PI: 5.49% (6.32%*)

Admin Dashboard Message

Sometimes it's necessary to notify authors of something when they next log into your WP administration panel. This code will render a bold message at the top of the page.

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

1
<?php 
2
/*
3
 Admin Dashboard Message
4
 http://www.beliefmedia.com/code/wp-snippets/admin-dashboard-message
5
*/
6
 
7
function beliefmedia_dashboard_mesage($message, $errormsg = false) {
8
  $type = ($errormsg !== false) ? '<div id="message" class="updated fade">' : '<div id="message" class="error">';
9
  echo '<strong>' . $type . $message . '</strong></div>';
10
}
11
 
12
function beliefmedia_admin_mesage() {
13
 beliefmedia_dashboard_mesage('New version of the Style Guide available. Download <a href="http://www.beliefmedia.com/">here</a>', true);
14
}
15
add_action('admin_notices', 'beliefmedia_admin_mesage');

Example

Admin Dashboard Message

Example admin alert message

Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate Billions in volume for our clients.

  E. Australia Standard Time [ UTC+10, Default ] [ CHECK TO CHANGE ]

  Want to have a chat?
 

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment