Php Code Not Working | WordPress.org

[ad_1]

https://prnt.sc/qReSdSIgCN_9

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

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

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer