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
- how to compare date meta value in jet smart filter Date query?
- Output after specific post in the loop
- How to force load a page in plugin?
- How to dynamically change spots of text in custom page?
- Retrieve a post with its ACF repeater fields in wordpress
- Attachement title in wpallimport
- Filter custom post type returned from REST api
- How to display content depending on the Woocommerce Product Category
- Render CMB2 select option to post page [closed]
- Update title field while listing wordpress page titles in Elementor selector
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- WordPress Plugin and other pages not opening
- Meta box not displaying on the plugin page
- Wrong block appender button showing
- Select posts from list and add them in a new list
- jet engine listing for every single taxonomy in post type [closed]
- How to export post tags from wordpress
- Failed to update a post when I add a taxonomy to it
- I want to show image from custom field image on my custom page template
- Create new page without menu in custom wordpress plugin
- Page with redirect
- CPT template is not being automatically used single post pages
- How to make content as required in custom post type?
- Set the title of a custom post automatically by using info from custom fields?
- FacetWP custom display based on post type [closed]
- Order custom post type by posts with most likes first
- public custom posts not showing in my wordpress plugin
- plugin translation *.mo file not getting loaded for custom post
- How to provide page_template path in custom plugin using WordPress
- Create CPT on Ajax Call
- Set the Social Icon Size in footer
- additional fields based on the quantity of products selected
- WordPress additional update of publications after importing WP All Import Pro
- ImageMagick on wordpress 6.5.5 for Linux Alma 8 success but which no magick
- WordPress theme is not displaying the correct home page in the Pages section
- fetch from an external api call and display results in page
- What is the easiest way to create a custom field archive?
- I am trying to add form using ACF plugin and acf_form() function, but my user fields dont show up properly
- How to add CPT in Elementor pro search template
- Issue using form in Google app in mobile
- My site has only one page, and users access my uploaded mp3 files from there – can I analyze access by song title?
- How to filter posts with a wp query by a custom dropdown type field with the magic fields plugin
- Tickera missing attendees – No attendees found
- Need to add custom cart item data
- Include theme header and footer in custom plugin
- How to fetch WordPress Gallery Images to a Custom Post Type?
- Disable All In One SEO plugin for custom post type
- How to disallow users to edit other’s posts for a new custom post type?
- Remove H1 title in admin post edit screen
- Fields are not displayed on front end under custom php code in Advanced Custom Fields and Flexible Content field WordPress
- How to include Font Awesome icons into ‘menu_icon’ from register_post_type() function – wp admin?
- PHP Fatal error: Cannot redeclare distance() when making a new block
- How to check if the post exists in any of the categories?
- How do I know if an archive correspond to a custom post type taxonomy?
- Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
- Keep the expansible tree (list of posts) open in the sidebar
- The sidebar in wp-admin dashboard disappears when viewed on mobile screens in WordPress
- How to Display News in a Timeline with Headline, Category, and Time?
- Custom Dynamic Tag in Elementor not showing image
- Load a custom post type template.html from a plugin
- Remove 3rd party plugin notices from within own plugin
- Show only those pages that are created by the specific logged in user in WordPress
- Query Custom Post Types on Available Dates