Support » Plugins » Hacks » How to call custom post type functions in a plugin with tabs

  • I’ve been able to get a custom post type working fine using a example plugin (there are many examples on the web how to do this), and I would like to take advantage of the ease of admin listing tables, adding posts, etc. However, I have a published plugin that uses tabs in the admin section, where each tab typically calls a function which renders the output (one tab for settings, one for rss feeds, etc). I have no idea if it is possible to call the functions that create the tables, etc, for a custom post type. Has anyone seen an example of how this might be done? Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    The table generation for all post types is handled by class ‘WP_Posts_List_Table’ . You can see how it is used in wp-admin/edit.php, which is requested with the url parameter post_type=mycustomname . This obviously isn’t a function you can call, but I imagine one could be created that uses the class to display a table, based on how the page works.

Viewing 1 replies (of 1 total)
  • The topic ‘How to call custom post type functions in a plugin with tabs’ is closed to new replies.