WordPress dynamic searchable table with Jquery UI

Fea­tures : cus­tom page tem­plate with dynamic post table. The table is then enhanced with Jquery dataT­a­bles to add search and sort func­tion­al­ity.
The goal was twofold : to present data in a search­able for­mat for vis­i­tors. To make it easy to update for the web­site admin with no html knowl­edge.
Using cus­tom fields, the client can enter a new post in a spe­cific cat­e­gory, and it will appear in the table.
Here is the code for the cus­tom page template:

<table cellpadding="0" cellspacing="0" border="0" class="display" id="food" style="width:600px" Location Dish Type ID, 'food-location', true ); $food_name = get_post_meta($post->ID, 'food-name', true ); $food_type = get_post_meta($post->ID, 'food-type', true ); echo ' '; if(!empty($food_location ) ) { echo ' ' . $food_location . ' '; /* Add any additional code. */ } if (!empty($food_name ) ) { echo ' ' . $food_name . ' '; /* Add any additional code. */ } if (!empty($food_type ) ) { echo ' ' . $food_type . ' '; /* Add any additional code. */ } echo ' '; ?>

You can see the demo at:
http://sideradesign.com/krf/food-drinks/

Leave a Reply