Posts Tagged ‘dashboard’

To remove any item of the admin bar of your site use following code.

function wps_admin_bar() {
    global $wp_admin_bar;
add_action( 'wp_before_admin_bar_render', 'wps_admin_bar' );

To show any warning message or notices in your wordpress admin panel/ dashboard use below code in your theme function.php file


function showMessage($message, $errormsg = false)
	if ($errormsg) {
		echo '<div id="message">';
	else {
		echo '<div id="message">';
	echo "<p><strong>$message</strong></p></div>";

function showAdminMessages()
    showMessage("Working on Theme's function.php, Do not touch it till further notice.", true);
add_action('admin_notices', 'showAdminMessages');