Can't get DataTable to show in Wordpress page
Can't get DataTable to show in Wordpress page
Hi guys,
I'm hoping this is an easy one to fix!
I currently use WP-Table Reloaded but I'd like to migrate to a fully manual DataTables system instead, due to a few bugs with WP-Table Reloaded that won't currently allow me manipulate my tables. I'm having trouble integrating it into Wordpress though.
Here is a test page where DataTables works perfectly:
http://australiabysong.com.au/test.htm
I have included this initialisation at the top of the page:
[code]
@import "/DataTables/media/css/demo_table.css";
$(document).ready(function() {
$('#australia').dataTable();
} );
[/code]
My problem is, when I integrate this into a Wordpress page, DataTables doesn't load. This is a test page within Wordpress:
http://australiabysong.com.au/test/
I use the same initialisation but nothing I can do will get DT to load.
Does anyone have any ideas on what I'm doing wrong here?
Much appreciated,
Dan
I'm hoping this is an easy one to fix!
I currently use WP-Table Reloaded but I'd like to migrate to a fully manual DataTables system instead, due to a few bugs with WP-Table Reloaded that won't currently allow me manipulate my tables. I'm having trouble integrating it into Wordpress though.
Here is a test page where DataTables works perfectly:
http://australiabysong.com.au/test.htm
I have included this initialisation at the top of the page:
[code]
@import "/DataTables/media/css/demo_table.css";
$(document).ready(function() {
$('#australia').dataTable();
} );
[/code]
My problem is, when I integrate this into a Wordpress page, DataTables doesn't load. This is a test page within Wordpress:
http://australiabysong.com.au/test/
I use the same initialisation but nothing I can do will get DT to load.
Does anyone have any ideas on what I'm doing wrong here?
Much appreciated,
Dan
This discussion has been closed.
Replies
You can also access a separate database from within worpdress by using wpdb functionality.
You would add the below code to functions.php
[code]$newdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);
$newdb->show_errors();[/code]
http://codex.wordpress.org/Class_Reference/wpdb