I suggest just making a new Post Type with the default WordPress register_post_type().
function create_my_post_type() {
$labels = array(
'name' => __( 'Providers pricing', 'myplugin_namespace' ),
'singular_name' => __( 'Provider pricing', 'myplugin_namespace' ),
'menu_name' => __( 'Provider Pricing', 'myplugin_namespace' ),
);
$args = array(
'labels' => $labels,
'public' => true,
'description' => __( 'Pricing stuff for my awesome plugin', 'myplugin_namespace' ),
'show_in_menu' => true,
'supports' => array( 'title', 'thumbnail' ), // or whatever else you want from WP_Post
'has_archive' => true,
);
}
To be clear: this should be run during plugin initiation. To add custom meta-boxes for your fields, read up on the function add_meta_box()
Related Posts:
- add_meta_box Callback not being called
- how do i remove posts from a WP_Query so the pagination is right?
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- Is it possible to define a template for a custom post type within a plugin independent of the active theme?
- How can I show drafts in wp_dropdown_pages list?
- Template for custom post type shows all posts instead of just one
- Plugin allowing for artists, events and venues
- wordpress reusable content blocks
- Saving Custom Post types and fields to a custom table
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- auto populate list of questions if user select a category xyz
- Redirect to another page using contact form 7? [closed]
- Custom Post Type Fields
- How to Resize the Custom Post Images?
- Amazon.com intergration with WordPress?
- Sticky option for custom post types without using custom fields or plugins
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Get post content from outside the loop with plugin shortcode usability
- How can I store data from custom fields to custom tables?
- Use jQuery Datepicker code from plugin
- “After file loaded” action
- Dictionary-style definition list plugin
- How to create repeater field manually, without plugin (ACF Pro)?
- Register PODS Custom Field with WPGraphQL [closed]
- Adding LOAD MORE on a page
- WordPress hide post from custom post-type on a single page
- Create multiple posts when a custom post is created
- Displaying image from a repeatable group
- Fake Single WordPress Post (Page) Loop
- What method should I use for a sidebar widget that reads latest posts?
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- How can i do custom author list?
- How do I add custom fields to the “Edit page” admin screen?
- A plugin for software reviews site like this one?
- Outputting custom field query from a plugin to the website header
- Links not opening as they should. Custom WP plugin
- How to access the page without registering in wordpress
- Tips for using WordPress as a CMS? [closed]
- Pass PHP variable to javascript
- Output before and after the loop
- How can i force Display names to be the same as Usernames?
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Custom options page checkbox will not save, despite working with text
- Upload files programmatically to users
- Plugin not saving values when placed in a folder within /wp-content/plugins
- Security checking in meta_box save is reluctant?
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Accessing post’s meta data based on user’s click of a post
- UnWanted Custom field added in the wp page edit area
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- WordPress plugin/theme or other wayout to create portable pages?
- Changing page URL and connect newsletter to MailChip
- Problem with the Loop – want to limit the access to three free articles
- WordPress page and plugin list using sql query
- Custom fields for custom post type
- WordPress Plugin manipulate have_posts()
- How to have sample page for each new register users in a membership website
- Adding class to last list item? Not WP generated
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- Custom Post Type – custom form in dashboard
- Huge number of 404 pages getting spawned
- Custom post types, disable fields
- WP-API Custom Post Type json_no_route
- How can I list custom post type categories of portfolio
- “Allowed memory size” problem [closed]
- Polldaddy doesn’t show up on own theme
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Custom Post Type, Custom Columns List
- Best approach to make all tags searchable by the wordpress search function
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- need click to clipboard button on my site
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- Preset custom fields
- Adding category base to url in custom post giving 404?
- Problem with checked box on wp car manager plugin
- Why Custom fields description is not working WordPress Version 5.4.2?
- Problem Advanced Custom Fields PRO
- Accessing download link from the loop with WP Download Manager Pro
- Show Post columns to specific users on condition
- Custom product page’s style for printing
- Create Inclusions and exclusions
- Create Biographies
- WordPress doesn’t save a post revision when changing CMB2 custom fields
- Changing the body of mail sent to new user registration
- Hidden Some Setting on Post or Page [duplicate]
- Custom Info Box at end of posts?
- Creating themes using the one Plugin (Toolkit)
- How to add jquery to my custom post type wp plugin
- WordPress list child pages of custom post type
- How to tell which Plugin is displaying?
- Wp Pagenavi how to display all results
- Redirect url in plugin to somewhere else?
- WordPress show different custom post type
- Attachement title in wpallimport
- Meta box not displaying on the plugin page
- Set the title of a custom post automatically by using info from custom fields?
- public custom posts not showing in my wordpress plugin
- plugin translation *.mo file not getting loaded for custom post