jQuery Tablesorter pathway problem (3 posts)

  1. deserturchin
    Posted 7 years ago #

    I am trying to use the jQuery Tablesorter with my tables and I can't get it to work. I don't know if it is a pathway problem with the scripts location or if I have left something out. Does anyone have any experience or success with Tablesorter working in WordPress?

  2. cemuls
    Posted 7 years ago #

    Place this code to your header.php

    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/YourFolder/jquery-latest.js"></script>
    	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/YourFolder/jquery.tablesorter.js"></script> />

    "YourFolder" is a folder under your theme directory, copy and paste jQuery-latest.js and jQuery.tablesorter.js to "YourFolder"

    In your post or page. place following code

    <table id="YourTableName">
        <th>Web Site</th>

    Place this code into javascript jquery.tablesorter.js


    YorTableName is your table ID that you can change. you can customize your table.

    may be that's what I know, I don't know how to customize it with my css theme, anyone who can add?

  3. deserturchin
    Posted 7 years ago #

    Thank you very much. I got it to work if I write out the table manually but I will be using php generated tables and it doesn't seem to work on the tables generated within the Loop. Do you know how to get around this?


Topic Closed

This topic has been closed to new replies.

About this Topic