This plugin allows a user to have multiple responsive tables per page or any where on a website.

Team A 26 1
Team B 27 4
Team C 22 10

Ireland Dublin
Portugal Lisbon
Spain Madrid
Italy Rome

This plugin can be used with the shortcodes in below tab, one of the most important aspects when using this on a page is to initialize the plugin shortcode with the pre shortcode:




The reason for this is to initialize the javascript which allows the Table Headers to appear as psuedo :before elements. The javascript allows multiple responsive tables per page without the need to hardcode psuedo elements. The pre shortcode lets this happen dynamically. You only need to use the pre shortcode init only once per page no matter how many tables that you use.

For creating my responsive tables when the screen width goes below 600px I hide the table headers and add a label instead inside a pseudo element of a table cell tag. I see a lot of examples online hardcoding these ::before content values in the CSS like in the example below:

    td:nth-of-type(1):before {
      content: "TEAM NAME"; }
    td:nth-of-type(2):before {
      content: "WINS"; }
    td:nth-of-type(3):before {
      content: "LOSSES"; }

For this plugin to work you need to have table headers set up as like in the example below:


         <th>TEAM NAME&lt/th>
         <td>Team A&lt/td>
         <td>Team B&lt/td>
         <td>Team C&lt/td>

Each time you use a table on the page you need to wrap each one in the following opening and closing shortcode tags:




To use Responsive Tables on a page you must first use the below shortcode to initialize:


Following this you must wrap each table in the following shortcode:



If you want to use different css styles you can set an ID on the shortcode

[responsive_table id="red-table"]


You can download this plugin in the WordPress directory via Website backend or you can download directly from the plugin page