Just I want to create the Project master, there I'll maintain the fields like 'Project type', 'Project Category' and 'Project name'. I've created the table in DB. I thought it is easy to achieve in Custom post type. So I followed the following steps
- Created the custom post type as 'Project'
- Created the Meta box and fields to get the user input for 'Project type', 'Project Category' and 'Project name'
- On save, via hook 'save_post', I got the user input through $_POST and saved the data in custom table( eg: wp_projects )
- The real problem occurred while listing the entries, I've used the 'custom_column' function, but it requires the post ID. But I haven't used post table to save the Projects.
- In 'custom_column' function I don't know how to iterate the Project table entries without using Post ID
One of my colleague suggest me to use 'wp_list_tables' class to list the entries in the custom table. I did the same, but here I'm not sure what will be the link to edit the custom table entries.
I'm struggling to create the master without using the Posts table. I don't want to insert the entries unnecessarily in post table, because that table is not suites to the Project table fields.
Thanks in advance.
WP_Query
codex.wordpress.org/Class_Reference/WP_Query and the bunch.wp_posts
andwp_postmeta
tables?