Boone's Sortable Columns Icon

Boone's Sortable Columns

By Boone Gorges

Active Installs

10+

Last Updated

May 27, 2011

First Released

May 23, 2011

Download History (Last one month)


Contributors

Here’s how I recommend using the class.

  1. Either activate this plugin, or include the class in your own plugin file.
  2. When you start to render the page with the post list, define some columns and then instantiate 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 );
  3. As you render your table, you can use all sorts of fun methods to create column headers. Example:

have_columns() ) : ?>
have_columns() ) : $sortable->the_column() ?>
<th class="the_column_css_class() ?>”>
<a href="the_column_next_link( ‘url’ ) ?>”>the_column_title() ?>

Two choices:
1. Install from the plugins repository and activate for use in your theme
or
2. Copy the BBG_CPT_Sort class into your own plugin/theme and require it manually.

No FAQ provided.

Changelog

1.1

  • Adds setup_base_url() method, for greater control over how column header URLs are generated

1.0

  • Initial release

Available Versions

Version Download Type
1.1 Download Stable
1.0 Download Stable
Development Download Trunk

Plugin Info

  • Version: 1.1
  • Last Updated: May 27, 2011
  • Active Installs: 10+
  • WordPress Version: 3.1 or higher
  • Tested up to: 3.2.1
  • PHP Version: or higher
  • Tags:    
    columns custom-post-types tables

Ratings


0.0 out of 5 stars. (0 reviews)

See all reviews
Scroll to Top