How to customize admin dashboard in wordpress


 How to customize admin dashboard in wordpress:-

If you want to show any dynamic content under wordpress dashboard page without using page template, then we can customize wp-admin/index.php file and display database content here.

Now i am providing complete code to fetch data from database and display in dashboard page.

 * Dashboard Administration Screen
 * @package WordPress
 * @subpackage Administration

/** Load WordPress Bootstrap */
require_once __DIR__ . '/admin.php';

/** Load WordPress dashboard API */
require_once ABSPATH . 'wp-admin/includes/dashboard.php';

require_once ABSPATH . 'wp-admin/admin-header.php';

<div class="wrap">
   <h1>Welcome in SCS</h1>
   <div style="margin-left: 40px;margin-top: 50px;float:left;">
   <p>View Student Record Here</p>
   <table border="1">

  $res = $wpdb->get_results( "SELECT rno,sname,branch,fees FROM wp_students");

   foreach ($res as $x) {
      echo "<tr><td>".$x->rno,"</td><td>".$x->sname."</td><td>".$x->branch."</td><td>".$x->fees."</td></tr>";

   <div id="dashboard-widgets-wrap">
   </div><!-- dashboard-widgets-wrap -->

</div><!-- wrap -->


require_once ABSPATH . 'wp-admin/admin-footer.php';


Post a Comment


POST Answer of Questions and ASK to Doubt

Post a Comment (0)