• Resolved ngoctam1011

    (@ngoctam1011)


    Hello,
    It does not work on my site when using table-info shortcode.
    The table [table-info id=8 field=”name” /] was last modified at [table-info id=8 field=”last_modified” format=”raw” /] by [table-info id=8 field=”last_editor” /].
    Please help to fix the issue.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Can you explain what exactly is not working? Above the table, I see the info

    D? li?u c?p nh?t l?n cu?i lúc 2020-02-11 16:34:58 b?i Saigon Animal.
    

    which seems to be coming from the Shortcodes?

    Regards,
    Tobias

    Thread Starter ngoctam1011

    (@ngoctam1011)

    I put the shortcode into Description field of table, it does not work on it.
    It works fine on post content.
    Do you know how to make it working on Description field?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the explanation! The reason for this is that TablePress does not evaluate Shortcodes in the Description field. To achieve that, you could add this to the end of your theme’s “functions.php” file:

    add_filter( 'tablepress_table_render_data', 'ngoctam1011_tp_shortcodes_in_description', 10, 3 );
    function ngoctam1011_tp_shortcodes_in_description( $table, $orig_table, $render_options ) {
      $table['description'] = do_shortcode( $table['description'] );
      return $table;
    }

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode [table-info] does not work on my site’ is closed to new replies.