Coding Custom Fields for Custom Post Types
-
Hi, I don’t really have much more than a basic plugin at this point with a Trains custom post type that works. I need to be able to track several properties per Train, including start/end dates, type of train (regular,themed,etc), capacity, etc.
I would like the back end marketing users to be able to enter a new Train in wp-admin by using a date picker and to store the date as a date, not a string.
I see that I can add custom fields but the values apparently can only be text. Then I’ve read some very old articles about metaboxes, but they don’t seem to support data types for the fields, such as a datetime type.So two questions please:
First, with FSE and WordPress 6.x, are metaboxes still current? Every resource I find about coding them is very old.
Second, can I really do a datetime field with a metabox? Are there any data types for custom fields, short of using a plugin?
I’d rather learn how to code this all up myself, I have a decent amount of CS knowledge. Thanks for any help!
- The topic ‘Coding Custom Fields for Custom Post Types’ is closed to new replies.