Skip to main content
code correction
Source Link
mike23
  • 6k
  • 7
  • 48
  • 70

You can edit the sidebar.php (or any sidebar-xxx.php file, depends on your theme) and interface with your database using the wpdb class.

If your historical events are in the same DB as wordpress you can use the wpdb class straight away, if they are in another DB you can instanciate a new wpdb class with :

global $wpdb;
$my_db = new wpdb('user','pass','dbname','host');

You can edit the sidebar.php (or any sidebar-xxx.php file, depends on your theme) and interface with your database using the wpdb class.

If your historical events are in the same DB as wordpress you can use the wpdb class straight away, if they are in another DB you can instanciate a new wpdb class with :

global $wpdb;
$my_db = new wpdb('user','pass','dbname','host');

You can edit the sidebar.php (or any sidebar-xxx.php file, depends on your theme) and interface with your database using the wpdb class.

If your historical events are in the same DB as wordpress you can use the wpdb class straight away, if they are in another DB you can instanciate a new wpdb class with :

$my_db = new wpdb('user','pass','dbname','host');
Source Link
mike23
  • 6k
  • 7
  • 48
  • 70

You can edit the sidebar.php (or any sidebar-xxx.php file, depends on your theme) and interface with your database using the wpdb class.

If your historical events are in the same DB as wordpress you can use the wpdb class straight away, if they are in another DB you can instanciate a new wpdb class with :

global $wpdb;
$my_db = new wpdb('user','pass','dbname','host');