• Resolved pauldotmac

    (@pauldotmac)


    Hi, I use an excel spreadsheet to generate some php code in a cell so that when it gets imported into Tablepress the desired data is displayed but it seems to have stopped working and converted the text into a comment i.e.

    <td class="column-5"><!--?php echo date("jS M y", 1717545600)  ?--><br><!--?php echo date("jS M y", 1718150400)  ?--><br><!--?php echo date("jS M y", 1718755200)  ?--><br><!--?php echo date("jS M y", 1719360000)  ?--><br><!--?php echo date("jS M y", 1719964800)  ?--></td>

    It used to work, has there been an update that now prevents it?

    Thanks

    Paul

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    By default, TablePress does not evaluate PHP code in table cells. There used to be a TablePress Extension that made this possible, but due security concerns, that is no longer available.

    Now, I’m not sure why your current PHP code is being replaced with HTML comments though… TablePress does not do that, and I’m not aware of a functionality in WordPress that would be doing that either…

    Anyways, the best approach here might be to develop a custom Shortcode that then evaluates your PHP code (with it being able to be influenced by the user) and returns the desired dates. Alternatively, you could maybe also simply create the desired date format in Excel, either statically or via formula.

    Best wishes,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘PHP Code in cells’ is closed to new replies.