Place my DataTable in to a Wordpress Site
Place my DataTable in to a Wordpress Site
AuronGraff
Posts: 11Questions: 2Answers: 0
I end my table, and now i need to place it in one page in my wordpress site.
how i make this?
This discussion has been closed.
Answers
Like you would do with any Javascript library. You'd need to refer to the WordPress documentation for that.
If you want a plug-in, consider using the TablePress plug-in for WordPress which uses DataTables.
Allan
i just throwthe js from datatables, the css and my html file in to wordpress
I have all my HTML and datatable resources in a folder, with the js css and my .html.
i need to place it in one page of my site.
I already try toplace it in the wp-contet/plugins but didnt work, so i dont know where to place it
You will need to add all datatables files to the theme folder. Then you need to go to functions.php to properly enqueue those files. You will also need to enqueue your own .js script with the datatables initializer/settings.
How to enqueue scripts with wordpress:
https://codex.wordpress.org/Function_Reference/wp_enqueue_script
How to enqueue styles with wordpress:
https://codex.wordpress.org/Function_Reference/wp_enqueue_style
There's also a plugin called TablePress that allows you to use datatables.
The js, css is into the folder called "DataTable" but i have a folder called "Publica"
Publica/DataTable/....
i already move all my files iside the Theme Child Folder.
Avada-Theme-Child/Publica/DataTable/....
So now, when i place all my html code inside the page, i only copy paste my code inside the defaullt text.
And when i see the page i can see all the table but no the style form datatable i selected
I found this ibdfaria:
function theme_enqueue_styles() {
}
wo now what i need to place here? :
I should point out that this is not a WordPress forum. If you need help with WordPress, then please refer to the WordPress documentation and support options.
Allan