• Resolved adriman2

    (@adriman2)


    I want to use one single table on multiple pages but filter them deppending on the page. For instance lets say I have a table with a “color” column. If I go to ‘all’ page I want to show all my entries. In the ‘blue’ page I want to show the table only with blue as value for the color column.

    I thought about updating the value in the search field but didn’t find a way.

    Thanks for any recommendation!

    https://wordpress.org/plugins/data-tables-generator-by-supsystic/

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

    (@supsysticcom)

    Hello!
    I’m sorry for late reply.
    You can do it using css styles for your table.
    You need to add such css styles into the page with table –

    variant 1 – it will hide only one column you need –

    <style type="text/css">
    #supsystic-table-1 th:nth-child(3), #supsystic-table-1 td:nth-child(3) {
        display: none;
    }
    </style>

    where –
    1 – is ID of the table;
    3 – number of column.

    variant 2 – will hide all columns in the table except one you need –

    <style type="text/css">
    #supsystic-table-1 th:not(:nth-child(3)), #supsystic-table-1 td:not(:nth-child(3)) {
        display: none;
    }
    </style>

    Please try it.

    Thread Starter adriman2

    (@adriman2)

    Hey thanks for the answer, I’m sure it will be useful in the future. Nonetheless I’m trying to filter the table, I don’t want to hide any of the columns.

    Another example: In this table.. Let’s say I want to show all the entries in which position contains Engineer. And do that depending on the page that the user is.
    Just like the search input would do, but doing it automatically depending on the page.
    Hope there’s a way I already tried it a lot but didn’t find a way yet.

    Thanks in advance!

    Plugin Author supsystic

    (@supsysticcom)

    Hello!
    You cannot implement this using css code. For this purpose you need special script. When you will finish the real table on your site and will decide with all nuances – please contact us through our internal support and describe us detail what exactly you need. We will help you to solve the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filtering Table’ is closed to new replies.