SSP Stacktable Tables

Description

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

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 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.

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.
  • 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 PTA Volunteer Sign Up Sheets plugin, 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.

Installation

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

FAQ

Installation Instructions

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

Reviews

Perfect

Was incredibly hard to find a table plugin to make my tables mobile friendly. So it was a big relief when this worked on my site. Thanks to the makers!

Does what it says – Thank you!

Our product variations in WooCommerce were not showing up correctly in mobile screens, getting cut off on the right, rendering our purchase buttons useless for mobile buyers. I learned of John Polacek’s script from the IgniteWoo developer of the Variation List plug-in. But I thought, “Gee, how do I implement this?” Then a search shows me this plug-in which utilizes the script, PLUS gives an admin panel to choose the type of page and/or posts to allow the tables to stack. The “all pages and posts” setting worked on our “products” custom post type, and bingo!… our product listings now stack in vertical groups in mobile. Problem solved. Now to adjust our CSS slightly so that the lines on our table rows don’t show up in every single stacked row when the mobile settings from the script kick in.

THANK YOU for creating this plug-in.

Read all 2 reviews

Contributors & Developers

“SSP Stacktable Tables” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

Version 0.0.4
* Used wrong CSS stylesheet for last update. Changed to minimal “example” stylesheet.

Version 0.0.3
* Updated jQuery Stacktable and jQuery Select2 files to latest releases as of October 19, 2017.

Version 0.0.2

  • First release on WordPress.org
  • Adding settings page and functions to enqueue the scripts only on the specified pages, as well as to disable built-in CSS

Version 0.0.1

  • Initial public release at the Stephen Sherrard Plugins web site at https://stephensherrardplugins.com