When should I go with post meta instead of just registering a new rest field when I want to add additional info about a post?

Say I have a post type called event which will take a custom Date from the user using a custom block. Now what i’m thinking is to make a meta block but i’m not sure if this is the way to go. I cannot store the Date as html and be clumped with content.

1 Comment
  1. Since post meta is available through the API, this question is meaningless.

    *I cannot store the Date as html and be clumped with content -* is this a question or comment?

    If you only want to add the data to the post – use an HTML form field, insert the field into the_content and save. So – yes – you can just clump it with content. IF you want it to be queryable, api or otherwise, make it meta.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer