If you use WP-table-reloaded plugin, you know that you can insert multiple tables on the same WordPress post, but you can search inside only one table at a time. This article explains how to enable multiple table search. You have to know what WordPress is, and you have to use WP-table-realoded plug-in, a must have plug-in IMHO. This article uses jQuery and DataTables JS Library, if you want you can learn them here: jQuery - DataTable
Using the code
You have to insert this code:
inside the header.php file of your current WordPress theme. The code is composed of two parts: the function
myFilter is executed when the button is clicked; so the value of the input is retrieved and passed to the right JS
theval = jQuery('#maininput').val();
oTable3 = jQuery('#wp-table-reloaded-id-3-no-1')
oTable4 = jQuery('#wp-table-reloaded-id-4-no-1')
<input id="maininput" type="text">
<input type="button" id="btnSearch" önClick="myFilter();"
value="SEARCH" /></p><br />');
Points of Interest
- First of all, please note that "#wp-table-reloaded-id-3-no-1" is the CSS ID of the table generated by the plug-in (and also the other one, of course).
jQuery('div.PostContent').before... with the correct selection of DOM node where to insert the HTML generated.
Web developer – Information services – translator
Title of Study: degree in computer science
Area of Expertise: Web programming in ASP.NET (C# and VB.NET)
Good Skills: indows Server 2003/2008, Active Directory, Security, Firewall (Watchguard), VPN, DataBase Management (SQL Server 2k/2005, OODBMS), Object Orientation, ASP, ASP.NET, Ajax, C#, XML;
Some knowledge: PHP, VBSCRIPT, MySql, PhpMyAdmin, Hosting management, DNS, VB.NET, Mdaemon mail server, Video Surveillance, WordPress, Graphic Design;