>
Download This Plugin | |
Download Elegant Themes | |
Name | Boone's Sortable Columns |
Version | 1.1 |
Author | Boone B Gorges |
Rating | 0 |
Last updated | 2011-05-21 04:00:00 |
Downloads |
594
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Boone's Sortable Columns plugin added 3 bytes of resources to the Home page and 6 bytes of resources to the sample Post page.
Boone's Sortable Columns plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Boone's Sortable Columns plugin ads no tables to your Wordpress blog database.Here's how I recommend using the class.
$cols = array(
array(
'name' => 'restaurant_name',
'title' => 'Restaurant Name',
'css_class' => 'restaurant-name',
'is_default' => true
),
array(
'name' => 'cuisine_type',
'title' => 'Cuisine Type',
'css_class' => 'cuisine-type',
'default_order' => 'desc'
)
);
$sortable = new BBG_CPT_Sort( $cols );
<table class="widefat">
<thead>
<?php if ( $sortable->have_columns() ) : ?>
<?php while ( $sortable->have_columns() ) : $sortable->the_column() ?>
<th class="<?php $sortable->the_column_css_class() ?>">
<a href="<?php $sortable->the_column_next_link( 'url' ) ?>"><?php $sortable->the_column_title() ?></a>
</th>
<?php endwhile ?>
<?php endif ?>
</thead>
<tbody>
...
</tbody>
</table>