Title: Adding CSS class in short code.
Last modified: April 12, 2018

---

# Adding CSS class in short code.

 *  Resolved [roy123](https://wordpress.org/support/users/roy123/)
 * (@roy123)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/)
 * Hello there,
    I wonder if there is an option to add in the shortcode a custom
   CSS-class that will be available to be used only in this presentation and not
   in other shortcodes of the same original table?
 * Thank you for this amazing plugin. I use it every day and also donated.
 * Thank you,
    Roye

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10175498)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Yes, that’s possible:
 *     ```
       [table id=123 extra_class_classes="your-class" /]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [roy123](https://wordpress.org/support/users/roy123/)
 * (@roy123)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10175563)
 * Hi Tobias,
 * Any version related to this?, as I tried with my current installation.
    When 
   using the following extra_class_classes=”TestMe”, I can’t find the TestMe class
   anywhere in the code ( when using development tool in the browser ).
 * [table id=2 row_highlight=”In Progress” filter=”In Progress” extra_class_classes
   =”ignoreDummy” /]
 * Thank you,
    Roye
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10175586)
 * Hi,
 * that’s strange. The class in the `extra_css_classes` parameter is given to the`
   <table>` element, in addition to `tablepress` and `tablepress-id-123`.
 * Regards,
    Tobias
 *  Thread Starter [roy123](https://wordpress.org/support/users/roy123/)
 * (@roy123)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10175850)
 * Any idea of how to debug this issue? Does it work on your end?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10176795)
 * Hi,
 * first, make sure to check the Shortcode in the “Text” (and not the “Visual” editor)
   of the post/page, to rule out that any other characters/HTML, e.g. from copy/
   paste are in the Shortcode.
 * Then, you could also add the `shortcode_debug=true` parameter to the Shortcode.
   This should then print a list of all actually used settings/parameters below 
   the table.
 * Regards,
    Tobias
 *  Thread Starter [roy123](https://wordpress.org/support/users/roy123/)
 * (@roy123)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10178570)
 * Hi Tobias,
 * Thanks for your tip on the shortcode_debug=true, the correct argument name to
   use is “extra_css_classes”.
    I kept on using the extra_class_classes as was shown
   in your first reply, and I failed to see the name you wrote in your second reply.
   Well, know I know how to debug and get all possible options.
 * Thank you for the great support and great plugin.
    Regards, Roye
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10178605)
 * Hi,
 * ah, of course! I’m so sorry for making that typo — and for then not spotting 
   it either!
    Good to hear that everything is working now!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Adding CSS class in short code.’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/adding-css-class-in-short-code/#post-10178605)
 * Status: resolved