Trying to make a plugin for wordpress
Trying to make a plugin for wordpress
PaulFreeWebs
Posts: 63Questions: 4Answers: 1
to start off im not sure if im posting this in the right place, sorry if its wrong.
I am trying to make a plugin just for use of my self for my blog i run with my friends, and im strugling on how to do this i would really be grateful if someone can help
I am trying to make a plugin just for use of my self for my blog i run with my friends, and im strugling on how to do this i would really be grateful if someone can help
This discussion has been closed.
Replies
You need to go to wordpress and ask there.
Allan
Allan
this is the code im currentlyusing http://pastebin.com/w19amwEm
The page you linked to before appears to work just fine.
EDIT: just realized what u ment i added id="datatable" in and it works i changed the "#example" too "#datatable"
Use iDisplayLength to change the default from 10 to whatever you want.
> is not in the order how i want it
You have non-numeric data in the first column - HTML tags, which is why it is string sorting.
DataTables 1.10 has built in support for this type of data, and you can get the latest dev version from http://datatables.net/download .
Allan
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css
http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js and
http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js
i followed this http://datatables.net/blog but i cant make it read from my own files
Allan
Perhaps Wordpress - Writing a Plugin? Just a wild guess.
http://codex.wordpress.org/Writing_a_Plugin
i have seen that but that dont really explain anything to me i think i ask on the wordpress forum
If I understood the question right, you would like to know how to link the javascript and CSS files in your plugin? The best would be not to link them from external sources, since it might not work locally then, it's better to include them somewhere in your WP plugin directory. Then, the correct way to do so is to use wp_enqueue_script(), wp_enqueue_style() functions:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
http://codex.wordpress.org/Function_Reference/wp_enqueue_style
But generally, I am not sure why would you need to write something that is already written. There is a bunch of plugins that use DataTables engine for rendering, consider just using them.
E.g., commercial plugin: http://wpdatatables.com/
Free plugin: http://tablepress.org/
See you!