SSP Stacktable Tables

from 0$

SSP Stacktable Tables is a WP Plugin Package from the Open Source WP Plugins range Reformat wide tables for mobile devices using the jQuery Stacktable plugin from John Polacek.


For more information about a tailored WP Plugin Package like SSP Stacktable Tables please contact us directly.

This is a fairly simple plugin that will collapse tables that are too wide for mobile screens into one of three “stacked” views.

The main functionality of this plugin is provided by the jQuery Stacktable plugin from John Polacek, which you can view here:
http://johnpolacek.github.io/stacktable.js/

I take no credit for the jQuery Stacktable plugin. That’s all John!

All this WordPress plugin does is enqueue the Stacktable script on the pages you specify in the settings, and then uses a very small piece of javascript to apply the Stacktable script to ALL tables on the pages you select. You can also disable the built-in sample CSS, so that you can put your own CSS for Stacktable in your theme in order to specify your own mobile breakpoint and any other modifications you wish to make.

Version 1.0.0 adds the ability to use a shortcode on any page to queue up the script. You can specify a type and class attribute, as well as head index and show header attributes.

The “type” attribute can one of the 3 display types: stacktable, cardtable, stackcolumns. Default view is stacktable.

The “class” attribute allows you to specify a class for the wrapper div around the mobile view so you can further tweak the CSS more easily.

The “headindex” attribute allows you to specify the header row index (starting from 0), in case your header row is not the first row of the table.

The “showheader” attribute can have values of “yes” or “no”, with “yes” being the default. This is used to specify if you want to show the headers when using the default stacktable display type (not used for the other 2 display types).

The shortcode to use with default options is simply: [stacktable]

Full Shortcode example: [stacktable type="cardtable" class="myClass" headindex="0" showheader="yes"]

Note that this plugin will have no effect on tables when the screen width is above the mobile breakpoint specified in the CSS.

Features:

  • Modifies tables to display nicely on mobile devices using the jQuery Stacktable plugin from John Polacek.
  • Select the specific pages you want the script to be enqueued on. It will be applied to all tables on those pages.
  • Alternately, in version 1.0.0, you can use the ‘stacktable’ shortcode on any page to queue up the stacktable script on that specific page as well as specify which of the 3 display options you want to use: stacktable (default), cardtable, stackcolumns
  • Can disable the built-in CSS so that you can queue up your own CSS styles and set your own mobile breakpoint

Additional Info

The main functionality of this plugin is provided by the jQuery Stacktable plugin from John Polacek, which you can view here:
http://johnpolacek.github.io/stacktable.js/

I created the initial version of this plugin to use for the tables generated by my Volunteer Sign Up Sheets plugin: https://wordpress.org/plugins/pta-volunteer-sign-up-sheets/, but made it generic enough that it could be used for any tables on a WordPress site. For the WordPress.org release I added an admin settings page to allow you to choose the pages the Stacktable script is enqueued on, and to allow you to disable the sample built-in CSS for the mobile view of the tables (as well as the mobile breakpoint).

Since I did NOT have anything to do with the main jQuery Stacktable plugin that provides the majority of the display functionality, I will not be able to provide support for any issues you have with the script.

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

SSP Stacktable Tables

typePlugin
version1.0.0
descriptionReformat wide tables for mobile devices using the jQuery Stacktable plugin from John Polacek.