• Resolved phil92

    (@phil92)


    Hello Community! ??

    I have two questions regarding the WP List Table Class. I already read that this class IS NOT MEANT to be used by plugin developers, still i am using it to develop a little plugin atm… (with a local class-copy!).

    The first of my two questions: Are there any other options on how to display data from my DB in the backend with any native functions/classes?

    Second question: If there are none, how do i manage to make my data editable via the “Edit”-link underneath a columns value?

    My Edit-Link currently has the following form:
    https://mysite.de/wp-admin/admin.php?page=wp_list_table_class&action=edit&advertiser=11965

    The ID for the advertiser to edit is correct, there’s just nothing happening for now as i click on “Edit”. Delete is working btw. I’m aware that i didn’t bind any function on that link, still those hidden fields, which seem to be neccessary to make things editable, get me confused real hard…

    Here’s a Link to a Gist with my code: https://gist.github.com/PhilWSRN/9ae675220bd90283d49999e81255ddf9

    Hope anyone is able to help. ??
    Thank you in advance!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    If your DB data is not any sort of WP objects, much of the list table class is not of much use to you. You could simply output a generic HTML table in which to display your data.

    To edit non-WP data, you need to handle your own edit UI. It can be part of your table display code if you want, or send users to a separate edit page. Either way, adding an edit action parameter will not do anything by itself. Your code needs to see the passed parameter and act upon it accordingly.

    Thread Starter phil92

    (@phil92)

    Alright, will do it that way.

    Thought i might be able to stick with that List Table Class.

    Thank you bcworkz!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP List Table Class’ is closed to new replies.