Title: PHP code versión of a shortcode in TablePress
Last modified: September 19, 2019

---

# PHP code versión of a shortcode in TablePress

 *  Resolved [gianoliveira](https://wordpress.org/support/users/gianoliveira/)
 * (@gianoliveira)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-version-of-a-shortcode-in-tablepress/)
 * Hi Tobias, I really appreciate you work. It’s really awesome!
 * I have created a table, [table id=1 /], that I would like to display in the “
   My Downloads” tab of the WooCommerce administration panel.
 * I know that I have to modify the source code of the file downloads.php (WooCommerce
   template) but I don’t know exactly what PHP code I have to add to show the table.
 * I tried adding the shortcode [table id=1 /] but it doesn’t work.
 * What would be the “translation” of the shortcode [table id=1 /] to PHP code to
   add it to this file?
 * [table id=1 /] = ???
 * Thank you very much!

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-version-of-a-shortcode-in-tablepress/#post-11950155)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * That is actually a bit difficult. Now, there is PHP code for a Shortcode:
 *     ```
       tablepress_print_table(
         array(
           'id' => '1',
         )
       );
       ```
   
 * However, that is only loaded on the frontend part of WordPress, so that it will
   probably not work on your Administration panel…
 * Regards,
    Tobias
 *  Thread Starter [gianoliveira](https://wordpress.org/support/users/gianoliveira/)
 * (@gianoliveira)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/php-code-version-of-a-shortcode-in-tablepress/#post-11968453)
 * Hi Tobias, thanks for your soon answer.
 * Good news! I was able to insert the table in “My Downloads” tab of the WooCommerce
   administration panel.
 * I think it didn’t work before because I was inserting a shortcode from the Download
   Manager plugin but this plugin didn’t work for me.
 * I have integrated YITH WooCommerce Memberships plugin and I inserted the shortcode[
   membership_download_product_links] to show download links when the user has an
   active membership and it works with TablePress table.
 * I hope this information can help other people.
 * Best regrads!
    -  This reply was modified 6 years, 7 months ago by [gianoliveira](https://wordpress.org/support/users/gianoliveira/).
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/php-code-version-of-a-shortcode-in-tablepress/#post-11972938)
 * 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/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

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

The topic ‘PHP code versión of a shortcode in TablePress’ 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

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

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/php-code-version-of-a-shortcode-in-tablepress/#post-11972938)
 * Status: resolved