Title: Php Code Not Working
Last modified: April 19, 2023

---

# Php Code Not Working

 *  Resolved [androjungle](https://wordpress.org/support/users/prashanthvarma42343/)
 * (@prashanthvarma42343)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/)
 * hi i want to add php code to the table but it is not working
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-code-not-working-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [androjungle](https://wordpress.org/support/users/prashanthvarma42343/)
 * (@prashanthvarma42343)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16667480)
 * [https://prnt.sc/qReSdSIgCN_9](https://prnt.sc/qReSdSIgCN_9)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16667840)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Using PHP code inside table cells is not possible, as this would create very 
   big security problems. Instead, you should put this code inside a small custom
   Shortcode and then use the Shortcode inside table cells.
 * Regards,
   Tobias
 *  Thread Starter [androjungle](https://wordpress.org/support/users/prashanthvarma42343/)
 * (@prashanthvarma42343)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16667902)
 * thank you , there are 20 rows with php codes, should i do the same with all of
   the codes. i want to insert this table in all existing posts
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16667986)
 * Hi,
 * yes, all such PHP code should be a Shortcode. You should try to abstract the 
   code as much as possible. You could e.g. also use one common Shortcode and then
   use attributes to distinguish what information should be returned.
 * Best wishes,
   Tobias
 *  Thread Starter [androjungle](https://wordpress.org/support/users/prashanthvarma42343/)
 * (@prashanthvarma42343)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16669161)
 * hi TobiasBg does it have an option to insert the table code to all existing posts
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16669382)
 * Hi,
 * no, that’s something that you will have to do. TablePress only creates the content,
   but where it is shown is up to you (especially as TablePress can not know where
   on the page you want to show a table). If you want to show a table on all pages,
   it might be the best to embed it inside the theme template or in a sidebar widget.
 * Best wishes,
   Tobias
 *  Thread Starter [androjungle](https://wordpress.org/support/users/prashanthvarma42343/)
 * (@prashanthvarma42343)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16669916)
 * hi i have added short code but why it is showing raw code instead of working 
   [https://prnt.sc/YpGejcr3Vw43](https://prnt.sc/YpGejcr3Vw43)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16670185)
 * Hi,
 * there’s some syntax error in your PHP code, probably something with the quotation
   marks.
 * Regards,
   Tobias

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

The topic ‘Php Code Not Working’ 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/)

 * 8 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/php-code-not-working-9/#post-16670185)
 * Status: resolved