Horje

Tips (Total 3)


# Tips-1) How to Customize the Dashboard

 

Customize the Dashboard

Just copy and paste following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');

function my_custom_dashboard_widgets() {
   global $wp_meta_boxes;

Remove these dashboard widgets.

Example: PHP
   unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
   unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
   unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

Add a custom widget called 'Help and Support'

Example: PHP
 wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'custom_dashboard_help');
}

This is the content for your custom widget

 function custom_dashboard_help() {
    echo '<p>Lorum ipsum delor sit amet et nunc</p>';
}

# Tips-2) How to Remove unwanted dashboard items

This was already posted but it did not have the full list of items. Especially those annoying "incoming links!"

Remove unwanted dashboard items

Just copy and paste following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');

function my_custom_dashboard_widgets() {
    global $wp_meta_boxes;

    // Right Now - Comments, Posts, Pages at a glance
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);

    // Recent Comments
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);

    // Incoming Links
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);

    // Plugins - Popular, New and Recently updated Wordpress Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);

    // WordPress Development Blog Feed
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);

    // Other WordPress News Feed
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

    // Quick Press Form
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);

    // Recent Drafts List
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
}

# Tips-3) How to Remove "Read More" page jumps

Instead return to the top of the page. You know how when you click "read more" it will jump to the spot in the page which can be annoying, this makes it just load the page normally, no jumping!

Remove "Read More" page jumps**

Just copy and paste following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
function remove_more_jump_link($link) {
    $offset = strpos($link, '#more-');
    if ($offset) {
        $end = strpos($link, '"', $offset);
    }
    if ($end) {
        $link = substr_replace($link, '', $offset, $end-$offset);
    }
    return $link;
}
add_filter('the_content_more_link', 'remove_more_jump_link');