Title: Example of Compact TablePress Implementation
Last modified: August 31, 2016

---

# Example of Compact TablePress Implementation

 *  Resolved [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/)
 * The TablePress documentation assumes a certain level of experience that I apparently
   don’t have. Can someone just give me an example of the Compact class implementation
   for my TablePress table?
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/page/2/?output_format=md)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7379940)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I’m not really sure what you mean here. Can you please explain in more detail
   what you want and example of?
 * Regards,
    Tobias
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7379978)
 * I have a TablePress table on a WordPress page and I want to set the class to “
   compact” to eliminate much of the white space currently in the table’s output
   format. I assume that’s the way to do that.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7379990)
 * Hi,
 * yes, if your theme contains CSS that uses a “compact” class, adding it to a table
   should work.
    For that, just add `compact` to the “Extra CSS classes” text field
   on the table’s “Edit” screen.
 * Regards,
    Tobias
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7379998)
 * Just enter the word compact in the text box labeled “Extra CSS classes”?
    How
   would I know if my theme uses a compact class?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7379999)
 * Hi,
 * yes, just inserting that word there would add it as a CSS class to the table.
 * You would have to check the theme’s “CSS” code to know. But then again, how did
   you come up with the idea of this “compact” class? Did you read about it somewhere?
 * An easier way for reducing the table white-space would be to set the padding 
   to a smaller value using a bit of CSS code. For example, add this to the “Custom
   CSS” textarea on the “Plugin Options” screen of TablePress:
 *     ```
       .tablepress th,
       .tablepress td {
         padding: 4px;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380000)
 * A link on the edit page got me here: [https://www.datatables.net/examples/styling/compact.html](https://www.datatables.net/examples/styling/compact.html)
 * Thanks for your help.
 * Hmmm… is there any way to not display a record with a date previous to the current
   day?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380002)
 * Hi,
 * ah, thanks for the clarification! This CSS class is only valid in DataTables,
   but not directly in TablePress. I suggest the CSS that I posted above to reduce
   the padding in your tables.
 * For showing only dates from the past, I suggest to take a look at the TablePress
   Extension that is explained at [https://wordpress.org/support/topic/show-only-future-dates?replies=4#post-6080471](https://wordpress.org/support/topic/show-only-future-dates?replies=4#post-6080471)
 * Regards,
    Tobias
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380041)
 * That sounds EXACTLY like what I need, but I don’t know how to install the extension.
   I tried to upload it like a plug-in, but I get the following message:
 * The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find
   End of Central Dir Record signature
 * How do I get that php code installed?
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380044)
 * Well, good news/bad news: After re-trying I was successful in getting the extension
   loaded — that’s the good news. The bad news is this new code feels compelled 
   to double-space the lines of text in a cell, and the default font and font color
   have changed.
 * My production website is SnakeOilWillie.com. I use FrankDeBonis.com as a test/
   learning site before rolling changes to production. The table on the home page
   of frankdebonis.com will show you the double-spaced rows.
 * I’ll keep muddling along to see if I can fix this, but if you feel compelled 
   to give me a hint, I would certainly appreciate it.
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380045)
 * …oh, and the other significant part of the good news is the function is working!
   No old dates displayed in my table!
 *  Thread Starter [frank1crayon](https://wordpress.org/support/users/frank1crayon/)
 * (@frank1crayon)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380046)
 * I got it. I introduced line-height to the css and that worked. Thanks for all
   your help Tobias.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380094)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  [Semih](https://wordpress.org/support/users/semihkiziltan/)
 * (@semihkiziltan)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380177)
 * Hi
    I am dummy about CSS.
 * Need to use compact design table. (Especially for magnified first column and 
   top-bottom lines.) [https://i.imgur.com/tlF3QaW.png](https://i.imgur.com/tlF3QaW.png)
 * How it can be used individual tables with in the plugin settings? I write “compact”
   in table options, it doesn’t work.
 * [https://i.imgur.com/CTv7oK6.png](https://i.imgur.com/CTv7oK6.png)
    [https://i.imgur.com/iY3vXxB.png](https://i.imgur.com/iY3vXxB.png)
 * I need basic instructions.
    Thanks.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380178)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Adding the `compact` class would only work if your theme has defined it.
    Using“
   Custom CSS” is the better way to go. You might just need a small change, to work
   around a conflict in your theme. Please try again with
 *     ```
       .tablepress td,
       .tablepress th {
         padding: 4px !important;
       }
       .tablepress th {
         padding-right: 20px !important;
       }
       ```
   
 * Regards,
    Tobias
 *  [Semih](https://wordpress.org/support/users/semihkiziltan/)
 * (@semihkiziltan)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/#post-7380179)
 * It seems the code has no function.
    Or I do something wrong maybe.
 * please look at the screenshot; [https://i.imgur.com/YSYaJDI.png](https://i.imgur.com/YSYaJDI.png)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/page/2/?output_format=md)

The topic ‘Example of Compact TablePress Implementation’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [compact](https://wordpress.org/support/topic-tag/compact/)

 * 22 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/example-of-compact-tablepress-implementation/page/2/#post-7380186)
 * Status: resolved