Content Generators
Content generators cover the building blocks of what visitors see and editors manage — post types, taxonomies, custom fields and shortcodes. Start here if you're modelling data: a recipe post type, a portfolio taxonomy, a shortcode that renders a pricing table.
register_post_type()Post TypeCustom post types with labels, supports, rewrite rules and REST exposure.register_taxonomy()TaxonomyHierarchical or flat taxonomies wired to any post type.add_shortcode()ShortcodeShortcodes with typed attributes, defaults and enclosing content.add_meta_box()Meta BoxEditor meta boxes with fields, nonces and sanitised save handlers.register_post_meta()Post MetaRegister typed post meta with REST support and auth callbacks.register_term_meta()Term MetaExtra fields on taxonomy terms, including the add and edit forms.register_post_status()Post StatusCustom statuses that show up correctly in the posts list and editor.register_block_pattern()Block PatternRegister reusable block patterns and pattern categories.