Dead Eye Creative
Select Page
//Replace howdy within the admin panel start
function replace_howdy( $wp_admin_bar ) {
$my_account=$wp_admin_bar->get_node(‘my-account’);
$newtitle = str_replace( ‘Howdy,’, ‘REPLACE THIS TEXT’, $my_account->title );
$wp_admin_bar->add_node( array(
‘id’ => ‘my-account’,
‘title’ => $newtitle,
) );
}
add_filter( ‘admin_bar_menu’, ‘replace_howdy’,25 );
//Replace howdy within the admin panel end
//Replace howdy within the admin panel start txt

Replace howdy within the admin panel WordPress

Hide Some Of the WordPress Branding within the Dashboard

//remove wordpress stuff from admin menu
function annointed_admin_bar_remove() {
global $wp_admin_bar;

/* Remove their stuff */
$wp_admin_bar->remove_menu(‘wp-logo’);
$wp_admin_bar->remove_menu(‘new-content’);
}

add_action(‘wp_before_admin_bar_render’, ‘annointed_admin_bar_remove’, 0);
//remove wordpress stuff from admin menu end

// hide administration page header logo and blavatar
function remove_admin_logo() {
echo ‘<style>#wp-admin-bar-wp-logo{ display: none; }
img.blavatar { display: none;}
#wpadminbar .quicklinks li div.blavatar {display:none;}
#wpadminbar .quicklinks li .blavatar {display:none;}
#wpadminbar #wp-admin-bar-new-content .ab-icon:before {display:none;}
#wpadminbar .quicklinks li .blavatar:before {display:none;}
</style>’;

}
add_action(‘admin_head’, ‘remove_admin_logo’);
// hide administration page header logo and blavatar end

//remove WordPress stuff from admin menu txt file

//more hides of the wordpress stuff
function b3m_login_logo_url_title() {
return ‘Web Dev by Jeremy Gradisher – 231 Graphics’;
}
add_filter( ‘login_headertitle’, ‘b3m_login_logo_url_title’ );

function b3m_modify_footer_admin () {
echo ‘<span id=”footer-thankyou”>Web Development by <a href=”http://www.231graphics.com” target=”_blank”>www.231graphics.com</a></span>’;
}
add_filter(‘admin_footer_text’, ‘b3m_modify_footer_admin’);
//more hides of the wordpress stuff end

Remove what you would like by default in the WordPress Dashboard

//This is php so use the // to comment that line out
//removing that stuff from the dashboard
function remove_dashboard_meta() {
remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’ );
//remove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_plugins’, ‘dashboard’, ‘normal’ );
//remove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘normal’ );
//remove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘normal’ );
//remove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ );
remove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ );
//remove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, ‘normal’ );
//remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ );
}
add_action( ‘admin_init’, ‘remove_dashboard_meta’ );
//removing that stuff from the dashboard end

Hide widgets in the WordPress Dashboard

This is good for when you would like to brand out the dashboard by default.

Creating a widget within the WP Dashboard

Notice that location is a factor – this one is using side high – Which means we are shooting for upper right hand corner

//Here is another example of a dashboard widget – This one goes to the top right
// Function that outputs the contents of the dashboard widget
function dashboard_widget_function_topright( $post, $callback_args ) {
echo ”
<a href=’http://www.deadeyecreative.com/’ target=’_blank’><img src=’http://www.deadeyecreative.com/wp-content/uploads/2014/08/dead-eye-1200.jpg’ style=’width:100%;’ /></a>
“;
}

// Function used in the action hook
function add_dashboard_widget_topright() {
//wp_add_dashboard_widget(‘dashboard_widget’, ‘Contact work.shop’, ‘dashboard_widget_function’);
add_meta_box(‘1’, ‘Call Jeremy Anytime’, ‘dashboard_widget_function_topright’, ‘dashboard’, ‘side’, ‘high’);
}

// Register the new dashboard widget with the ‘wp_dashboard_setup’ action
add_action(‘wp_dashboard_setup’, ‘add_dashboard_widget_topright’ );
//Here is another example of a dashboard widget – top right end
//end end //end end //end end //end end //end end //end end

//Here is another example of a dashboard widget – This one goes to the top right
// Function that outputs the contents of the dashboard widget
function dashboard_widget_function_botright( $post, $callback_args ) {
echo ”
<a href=’http://www.231graphics.com’ target=’_blank’><img src=’http://www.deadeyecreative.com/wp-content/uploads/2014/11/231-logo-650.png’ style=’width:100%;’ /></a>

<ul>
<li><strong>Website:</strong> <a href=’http://www.231graphics.com’ target=’_blank’>www.231graphics.com</a></li>
<li><strong>Contact by Email:</strong> <a href=’mailto:jeremygradisher@gmail.com’>jeremygradisher@gmail.com</a></li>
<li><strong>Contact by Telephone:</strong> (xxx) xxx-xxxx</li>
</ul>

<p><i>*Feel free to contact me at anytime with questions or comments.</i></p>
“;
}

// Function used in the action hook
function add_dashboard_widget_botright() {
//wp_add_dashboard_widget(‘dashboard_widget’, ‘Contact work.shop’, ‘dashboard_widget_function’);
add_meta_box(‘2’, ‘231 Graphics’, ‘dashboard_widget_function_botright’, ‘dashboard’, ‘side’, ‘low’);
}

// Register the new dashboard widget with the ‘wp_dashboard_setup’ action
add_action(‘wp_dashboard_setup’, ‘add_dashboard_widget_botright’ );
//Here is another example of a dashboard widget – top right end
//end end //end end //end end //end end //end end //end end
//dashboard stuff – dashboard stuff – dashboard stuff

Adding another widget to the dashboard – this one is in a different location.

This one location I was going for bottom right hand corner

//this changes the logo on the login page
function my_login_logo() { ?>
<style type=”text/css”>
body.login div#login h1 a {
background-image: url(http://www.deadeyecreative.com/wp-content/uploads/2014/11/231-logo-650.png);
padding-bottom: 2px;
width:300px;
background-size: 300px;
height: 93px;
}
</style>
<?php }
add_action( ‘login_enqueue_scripts’, ‘my_login_logo’ );
//this changes the logo on the login page – end

//this changes the link for the login logo on the login page
function loginpage_custom_link() {
return ‘http://www.deadeyecreative.com’;
}
add_filter(‘login_headerurl’,’loginpage_custom_link’);
//this changes the link for the login logo on the login page – end

//this changes the title tag on the logo image of the login page
function change_title_on_logo() {
return ‘Dead Eye Creative’;
}
add_filter(‘login_headertitle’, ‘change_title_on_logo’);
//this changes the title tag on the logo image of the login page – end

Changing the Login Logo WordPress

This is how to change the login logo on wp-login.php WordPress




Pin It on Pinterest

Share This