• Hello,
    I created a table in the database.
    now i need to fetch the data and display it in an html table.
    I would like to do this in a file within my child theme that calls the necessary functions from functions.php.
    I have already read the data.
    This table must have the following characteristics:
    – Take advantage of wordpress pagination to be able to decide how many lines per page should be displayed;
    – Regarding the columns, for some of them, the sorting function (ASC and DESC) will be needed;
    – I need to set text type search filters but also “date to date” type search filters with the calendar.

    Before we start, in order not to be mistaken, I would like to have your expert opinion on which tools or plugins or other to use to do the above.
    What is the right way to go?

    Thank you!

    • This topic was modified 3 years, 7 months ago by guardiano78.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You made a good first choice by creating a child theme. To make optimal use of WP pagination, avoid making your own custom query for table content. I’m assuming table data is saved in various posts or custom post types. If not, WP pagination will not work very well. IMO you are better off developing your own pagination scheme using the SQL LIMIT clause for non-post data. For post type data, modify the default query through the “pre_get_posts” action. Then WP will handle pagination almost automatically.

    I’d avoid relying on other plugins for portions of what you need. By all means use other plugin source code for guidance if your’re not sure how to do something. Just avoid actually installing and activating the plugin. There are numerous exceptions of course. Plugins that make your job a lot easier, like a custom fields plugin, are reasonable to use.

    To implement filtering and column ordering, it’s simplest to have JavaScript request a new page with appropriate query vars on a selection event, similar to how back end list tables work.

Viewing 1 replies (of 1 total)
  • The topic ‘responsive table with filters’ is closed to new replies.