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, this is possible with the hide_rows parameters, and similar.
    See https://tablepress.org/faq/documentation-shortcode-table/ for details.

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    Great thanks – that’s what I needed.

    Thread Starter einstein green

    (@einstein-green)

    another question: I have this sorting code:
    “columnDefs”: [ { “type”: “formatted-num”, “targets”: 1 } ]

    which gets messed up if I hide/show columns in the same table, right? Can that also go in that shortcode instead of in the “custom commands” area at the bottom of the table?

    Thread Starter einstein green

    (@einstein-green)

    sorry I think I closed that post too soon…

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    Yes, that “Custom Commands” will fail if that second column which shall be formatted as numbers is no longer the second column

    I’m afraid that setting that “Custom Command” in a Shortcode parameter is not possible that easily. ??

    For one thing, setting the “Custom Commands” via Shortcode parameter is turned off by default, due to security concerns. (This can however be changed by the admin of the site, if he trusts all users on the site.)

    The other problem comes from your specific “Custom Command”. As it contains a closing bracket ], WordPress will interpret that as the end of the Shortcode (which also uses ]), so that the “Custom Command” would break ??

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    OK thanks. What if I set that custom command to include columns that don’t need to be sorted that way – like if I set both columns 1 & 2 in that code, to cover when I show/hide the columns…?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    the “Custom Command” does not care about the show/hide parameters (as it doesn’t even know about them). It will simply apply the desired sorting format to whatever the set columns are.

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘hiding/showing columns shortcode’ is closed to new replies.