intelligence_src_6dc544294b7f21f98a
- Source-provided label
- Publisher RSS metadata
- Evidence class
- mentioned in report
- Confidence
- Not reported
- Observed
- Nov 30, 2026 06:00 UTC
- Retrieved
- Nov 30, 2026 06:09 UTC
Originally published on CodingCush. A custom post type in WordPress is a new kind of content with its own admin menu and its own pages on your site. Posts are for blog articles and pages are for fixed content like About and Contact, but a custom post type stores a different kind, such as recipes or team members, in its own neat box. This tutorial shows you what one is, when you need one, and how to register one with a few lines of PHP. Step 1: Understand What a Custom Post Type Is WordPress ships with five built in post types: post, page, attachment, revision, and menu. Each one is a container for a different kind of content: a post appears in your blog feed, a page does not, and an attachment is a media file. A custom post type is just a sixth container that you define yourself. Picture a food blog with two hundred recipes stored as normal posts, mixed in with news updates in the same category list. Give the blog a Recipes post type instead, and the recipes get their own admin menu and their own archive page at yoursite.com/recipes/. If WordPress itself is still new to you, read our guide to what WordPress is, explained simply first. Step 2: Decide When You Actually Need One Not every site needs one. Ask one question: does this content repeat with the same shape every time? You need one when the shape repeats. A recipe always has a title, ingredients, and steps. A portfolio project always has a title, a screenshot, and a link. Events, products, and testimonials fit the same pattern. You do not need one when a category or a tag would do the job. Ten travel stories are just posts in a Travel category. If the content will grow into a collection, give it its own post type. If it is a one off, do not. Step 3: Register Your Post Type With Code You register a post type with one WordPress function, register_post_type(), hooked to the init action. We will register a Recipes post type as our example. The official Registering Custom Post Types guide in the WordPress Plugin Handbook shows the same pattern. The official docs recommend putting custom post types in a plugin rather than a theme, so your content stays portable if you change your theme later. If you are not sure how the two differ, read our guide to the difference between a WordPress theme and a plugin. Paste this into a tiny custom plugin: function codingcush_register_recipe_post_type() { register_post_type( 'recipe', array( 'labels' => array( 'name' => __( 'Recipes', 'codingcush' ), 'singular_name' => __( 'Recipe', 'codingcush' ), ), 'public' => true, 'has_archive' => true, 'show_in_rest' => true, 'menu_icon' => 'dashicons-food', 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ), 'rewrite' => array( 'slug' => 'recipes' ), ) ); } add_action( 'init', 'codingcush_register_recipe_post_type' ); The function name is ours. register_post_type() takes a short key, 'recipe', and a list of settings. The key must be 20 characters or fewer, lowercase letters, numbers, dashes, and underscores only, and it must not be a reserved name like post, page, or attachment. The labels array sets the words shown in the admin area: Recipes in menus and Recipe on the single item screen. The __() function marks those words as translatable. The next three settings control visibility. 'public' => true makes the post type visible on the front of the site and in the admin area. 'has_archive' => true gives it an archive page at yoursite.com/recipes/. 'show_in_rest' => true includes it in the REST API, which is what makes the modern block editor available. Skip that last one and you will be stuck with the old classic editor. 'menu_icon' => 'dashicons-food' picks the food icon for the admin menu. WordPress ships a set of icons called Dashicons, so you can swap in dashicons-b
3d3a60dafbb1ebb73465b527518fb2acc7dc9c8e1e70384c1d4404079dd9b132Network indicators are visibly defanged. This page does not make them clickable or send them to another service.
No validated file hashes or network indicators are stored for this record.
This record contains metadata and attribution only. It does not host, download, unpack, render, or execute malware samples.
Sources represented on this page. Publication and observation dates describe the content; successful batch dates describe local collection. A recent batch does not certify complete coverage or current provider availability.
1 sources: 0 stale, 0 needing attention, 0 paused, 0 unverified.
Stale means older than twice the recorded collection interval, with a minimum of one hour; without an interval, the threshold is 24 hours. Cached content remains available while a feed is stale, paused, or unverified.