• Resolved FX_002

    (@fx_002)


    Hello,

    My problem initialy concerns Shortcodes update in table cells but it’s the same problem with a simple PHP code with the “PHP code in table cells” extension.

    If i just put the following line in a cell and refresh the page in my Web browser :
    <?php echo date(“H:i:s”)?>

    Then there’s two solutions :
    – if i am connected on my website, everything is fine and the time is update each time i refresh my browser
    – if i am not connected, the time is never update until i connect on WordPress, go on my dashboard and save the table. The time is updated one time and then time never update again when i refresh.

    My real problem is with a shortcode which contain php code inside for connecting to my SQL database. But it’s the same problem of refreshing the time, i think.

    Does anyone have a solution for that?

    Thanks in advance.
    FX

    https://wordpress.org/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is related to the table output caching that TablePress uses. You could turn that off by extending the used Shortcode to

    [table id=123 cache_table_output=false /]

    Regards,
    Tobias

    Thread Starter FX_002

    (@fx_002)

    Hello,

    Maybe it would be good to have a checkbox somewhere in the tablepress setting to turn the output caching on/off and which describe the use of the output caching. Because it was very hard to find the solution on the forum.

    But now it’s working perfectly with the extended Shortcode line.

    Thanks a lot for this quick reply.
    Regards,

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    good to hear that this worked!

    I’m not sure that a checkbox would be helpful here. Most users will never care about this (because they are not using dynamic content), and they might even be confused by an extra checkbox that they don’t understand (because it’s something very technical).
    I therefore think that the Shortcode option is much better. I agree that it could be documented better though, yes.

    Best wishes,
    Tobias

    Thread Starter FX_002

    (@fx_002)

    Yes, the checkbox may be confuse. I agree.

    Thanks a lot for what you do.
    TablePress is very nice and very simple to use.

    Regards,
    FX

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the nice words, I really appreciate it!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

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

The topic ‘Update problem with Shortcodes and PHP code in table cells’ is closed to new replies.