• Resolved theking2

    (@theking2)


    The Tablepress plug works and it is possible to instert new tables. What doesn’t work is user sorting and selecting. The cause being that the required js scripts are not included. If I add this to my template it works:

    <script src="/wp-content/plugins/tablepress/js/jquery.datatables.min.js"></script>
    <script type="text/javascript"> jQuery(document).ready(function($){ $('#tablepress-11').dataTable({"order":[],"orderClasses":false,"stripeClasses":['even','odd'],"pagingType":"simple"}); }); </script>

    But that probably is not the idea of the plugin.

    How do I make sure that the datatable macros work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Your theme probably does not contain the mandatory call of the <?php wp_footer(); ?> function right before the closing </body> HTML tag in its footer.php file.
    Could you please check that?

    Regards,
    Tobias

    Thread Starter theking2

    (@theking2)

    Danke,
    But that is not the problem. Both Footer.php and get_footer are present. The script entries were inserted manually in footer.php and for the specific table #tablerpess-11 the table is shown correctly.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    if you had to manually add the two lines from your first post, then something was not correct with wp_footer();.
    The lines would be added automatically by TablePress if the “Use DataTables” checkbox on the table’s “Edit” screen is checked.

    Does everything work with a WordPress default theme like TwentySixteen?

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘datatable js are not loaded’ is closed to new replies.