Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter androjungle

    (@prashanthvarma42343)

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    (@prashanthvarma42343)

    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 TobiasBg

    (@tobiasbg)

    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

    (@prashanthvarma42343)

    hi TobiasBg does it have an option to insert the table code to all existing posts

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    (@prashanthvarma42343)

    hi i have added short code but why it is showing raw code instead of working https://prnt.sc/YpGejcr3Vw43

    Plugin Author TobiasBg

    (@tobiasbg)

    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.