comment 1

Create Admin Notices in WordPress Admin Dashboard

Hi yaa… long time no see  8)  after finished my tessis now I can write again in my lovely blog  :fufu:  . Today I want to share a little tutorial how to create admin notices in wordpress admin dashboard. There are two style of admin notice , the first is admin notice with yellow color and red color. okey here is the code :

function my_admin_notice(){
echo '<div class="error"><p>';
printf('EVERYONE WHO SEE THIS NOTICE, PLEASE REPORT TO <A HREF="MAILTO:admin@r3m1ck.us">HERE</A>');
echo "</p></div>";
}
add_action('admin_notices', 'my_admin_notice');


Sponsored links



open your function.php in your active themes directory, and then add that codes into function.php . Save and reload your wordpress admin dashboard.

the background color red because we using error div style, if we want to change this background to yellow, we using update div style, and if you want to change another colors you must make custom cascading style sheets . I hope this little tutorial is useful for the readers :) , See another post .

reference : http://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices

1 Comment so far

    Leave a Reply

    Your email address will not be published. Required fields are marked *


     

    This site uses Akismet to reduce spam. Learn how your comment data is processed.