• Resolved roy123

    (@roy123)


    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

    (@tobiasbg)

    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

    (@roy123)

    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

    (@tobiasbg)

    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

    (@roy123)

    Any idea of how to debug this issue? Does it work on your end?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    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

    (@roy123)

    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

    (@tobiasbg)

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