Skip to content

Instantly share code, notes, and snippets.

View erikccoder's full-sized avatar

erik-joeng erikccoder

View GitHub Profile
@erikccoder
erikccoder / remove_widget.php
Created May 10, 2013 04:48
wordpress remove widget from dashboard
//HIDING UNWANTED WORDPRESS DASHBOARD WIDGETS
add_action('wp_dashboard_setup', 'wpc_dashboard_widgets');
function wpc_dashboard_widgets() {
global $wp_meta_boxes;
// Today widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
// Last comments
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
@erikccoder
erikccoder / add_widget.php
Created May 10, 2013 04:48
wordpress create widget in dashboard
// Add a widget in WordPress Dashboard
function wpc_dashboard_widget_function(){
// Entering the text between the quotes
echo "<ul>
<li>Release Date: March 2012</li>
<li>Author: Aurelien Denis.</li>
<li>Hosting provider: my own server</li>
</ul>";
}
@erikccoder
erikccoder / wpse_76491_admin_bar_menu.php
Created May 10, 2013 04:46
wordpress remove backend admin bar
// remove admin bar at backend
//plugin: http://wordpress.org/extend/plugins/wp-admin-bar-removal/
add_action( 'admin_bar_menu', 'wpse_76491_admin_bar_menu', 200 );
function wpse_76491_admin_bar_menu()
{
global $wp_admin_bar;
if ( !is_object( $wp_admin_bar ) )
return;
@erikccoder
erikccoder / remove_front_admin_bar.php
Created May 10, 2013 04:44
wordpress remove admin bar in front end
// remove admin bar at front end
add_filter('show_admin_bar', '__return_false');
@erikccoder
erikccoder / update_admin_footer.php
Created May 10, 2013 04:42
wordpress, update, admin footer
@erikccoder
erikccoder / wpc_url_login.php
Last active December 17, 2015 04:39
wordpress, logo url,
// Use your own external URL logo link.
function wpc_url_login(){
return "http://erikyang.info/"; // your URL here
}
add_filter('login_headerurl','wpc_url_login');