As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #961276
Hide columns via url
Closed

Comments

  •  2
    fmelin started the conversation

    Hi, I would like to know if you can hide the columns via url ($ _GET) attached image as an example,

    Beforehand thank you very much.

  • [deleted] replied

    Hi fmelin,
    Thank you for your purchase.

    Unfortunately something like this is not possible with built-in functionalities. Columns can be hidden from table settings or with custom function but it is not possible to hide them via URL.

  •  2
    fmelin replied

    How could you hide with a custom function ?, you could indicate the source code and how to use it.

    Beforehand thank you very much.

  • [deleted] replied

    Hi fmelin,

    You can hide it with JavaScript like this:

    <script>
    jQuery( window ).load(function() {
    wpDataTables.table_1.api().columns(0).visible(false)
    });
    </script>

    Where columns(0) is first column in the table.

    Or with PHP like my colleague wrote you in your last ticket:

    In file functions.php add this code

    function test_func($jsDef, $columnHeader) {
        if ($jsDef->origHeader =="OrignalColumnName") {
            $jsDef->bVisible = false;
        }
        return $jsDef;
    }
    add_filter('wpdatatables_filter_column_js_definition','test_func',10,2);
    

    Where "Original ColumnName" is the name of your column that you want to hide.