• Resolved melster777

    (@melster777)


    Hi guys i would like to ask how to use this function (below) how can i call it on my template

    add_filter( ‘tablepress_cell_content’, ‘christom_search_in_cells’, 10, 4 );
    function christom_search_in_cells( $cell_content, $table_id, $row_idx,
    $col_idx ) {
    if ( ‘123’ != $table_id ) {
    return $cell_content;
    }
    if ( false === stripos( $cell_content, ‘searchterm’ ) ) {
    $cell_content = ”;
    }
    return $cell_content;
    }

    https://www.ads-software.com/plugins/tablepress/

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    You can either paste this code into a small new TablePress Extension (which is just a plugin for WordPress actually), or simply paste it into the “functions.php” file of your theme.
    Don’t forget to change the table ID (from 123) and the search term (from searchterm) to the desired values.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘How to use this function for this tablepress plugin’ is closed to new replies.