• Resolved brandi823

    (@brandi823)


    Hello, is there a way to get every table I have created instead of adding them seperatly via shortcode? I want to get every table ive created and show them on a page.

    I am familiar with adding code to templates so if there is any php code please let me know.

    Thanks

    • This topic was modified 5 years, 4 months ago by brandi823.
Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, there’s no direct way to get all tables, but you could indeed use PHP in a template: https://tablepress.org/faq/documentation-template-tag-functions/
    That way, you can use a template tag function instead of Shortcodes.

    And now that I remember, in PHP you could get a list of all tables (only the IDs!), using

    $table_ids = TablePress::$model_table->load_all();
    

    Then, you could loop through the array and call the template tag function with that ID.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘How to get all tables created’ is closed to new replies.