Support » Fixing WordPress » Custom post type Product and admin page customization workflow

  • Hi,
    I’m very new to WP and I’m learning it so please forgive me for my possible newbie posts.
    As a learning exercise I’m tryin to create a very little and basic “ecommerce” in WP without the use of any pre made plugin. All by php and WP api.

    First thing first I’ve registered (by the plugin I’ve created) a custom post type for products (and custom taxonomy).
    What I would like to do is give to this product my personal fields: Name, Price, Description, status of availability etc…
    For that reason I’ve set the ‘supports’ => array( ” ) to remove everything from the admin page.
    Now I’m a bit stuck cause I can’t figure out what would be the best pratice to proceed with my personal fields.
    I’ve thought about ‘custom-fields’, but I’m confused about it cause I would like to give a clean template to this page. A sort of:
    Label | Input field
    Not the premade custom field that WP gives by ‘supports’
    Hope it’s clear what I mean.
    I’ve also read about settings options but as much as I’ve understand it’s related to pages, not to post-like things so I guess it’s wrong.

    What’s the best workflow to give my personal fields to the product item and have a customized admin page?

Viewing 1 replies (of 1 total)
  • Hi,
    To add fields for the CPT edit page, you need to register one or more meta box, then you can add your fields (or any other content) in those meta boxes. There are some frameworks and plugins that make this process easier but you mentioned you want to do it yourself, so just search for WordPress meta box tutorial or similar query in Google, there are tons of resources available that can help.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type Product and admin page customization workflow’ is closed to new replies.