Title: Feature request: shortcode &quot;disabled&quot;
Last modified: August 30, 2016

---

# Feature request: shortcode "disabled"

 *  Resolved [tproli](https://wordpress.org/support/users/tproli/)
 * (@tproli)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/feature-request-shortcode-disabled/)
 * Hi,
 * just encountered an issue where a “disabled” shortcode could have been beneficial.
 * For example, having multiple tables on a page which need to be toggled on/off
   periodically. If the user could add disabled=”true” to remove it temporarily,
   it would be nice, not having to remove it entirely. Of course this is mainly 
   for the admin editor, in templates it’s easier to toggle on/off.
 * I can do it if you don’t have time and create a PR at GitHub.
 * Thanks!
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/feature-request-shortcode-disabled/#post-6571776)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * I don’t really think that this is something that should go into the main plugin,
   as only very few people will ever need it. Instead, this can achieved with just
   a little bit of custom code, that is added either to the “functions.php” of the
   theme or a small new plugin file:
 *     ```
       add_filter( 'tablepress_table_not_found_message', 'tablepress_prevent_table_not_found_message_for_disabled_tables', 10, 2 );
       function tablepress_prevent_table_not_found_message_for_disabled_tables( $message, $table_id ) {
       	if ( empty( $table_id ) ) {
       		$message = '';
       	}
       	return $message;
       }
       ```
   
 * After that, you could change the Shortcode from
 *     ```
       [table id=123 /]
       ```
   
 * to
 *     ```
       [table disabled_id=123 /]
       ```
   
 * to hide it.
 * Regards,
    Tobias
 *  Thread Starter [tproli](https://wordpress.org/support/users/tproli/)
 * (@tproli)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/feature-request-shortcode-disabled/#post-6571790)
 * Thanks, just tried and worked!
 * I’m still not 100% convinced that it’s a feature that shouldn’t go into the core
   but you surely know it better than me 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/feature-request-shortcode-disabled/#post-6571802)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * This is the first request about a feature like this that I remember, so there’s
   definitely not much interest from the majority of users 🙂
 * Best wishes,
    Tobias

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

The topic ‘Feature request: shortcode "disabled"’ 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

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

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/feature-request-shortcode-disabled/#post-6571802)
 * Status: resolved