| name | wp-core-blocks |
| description | Complete reference for WordPress core blocks: all 113+ blocks with their attributes, supports, categories, and markup examples. Use when building layouts with core Gutenberg blocks. |
| compatibility | WordPress 6.8+ (113 blocks). WordPress 6.9+ adds Accordion block. |
WordPress Core Blocks Reference
When to Use
Use this skill when:
- Building layouts using WordPress core blocks
- Looking up block attributes, supports, or parent blocks
- Understanding which blocks to use for specific layouts
- Converting designs to block markup
Block Categories
WordPress organizes blocks into 7 main categories:
| Category | Purpose | Key Blocks |
|---|
| Text | Content and typography | Paragraph, Heading, List, Quote, Table, Code |
| Media | Images, video, audio | Image, Gallery, Cover, Video, Audio, File |
| Design | Layout and structure | Group, Columns, Row, Stack, Separator, Spacer |
| Widgets | Dynamic content | Archives, Calendar, Categories, Search, Latest Posts |
| Theme | Site structure | Navigation, Site Title, Query Loop, Post Content |
| Embed | External content | YouTube, Twitter, Vimeo, etc. |
| Reusable | Synced patterns | Pattern block |
Layout Blocks (Design Category)
core/group
Container block for grouping content. Most versatile layout block.
Attributes:
{
"tagName": "div",
"templateLock": false,
"allowedBlocks": []
}
Supports:
align: full, wide, left, center, right
background: backgroundImage, backgroundSize
color: background, gradients, text, link, heading, button
dimensions: minHeight
spacing: margin, padding, blockGap
layout: constrained, flex, grid
position: sticky
Markup:
<div class="wp-block-group alignfull">
</div>
With background and styles:
<div class="wp-block-group alignfull has-background" style="background-color:#f0f0f0;padding-top:4rem;padding-bottom:4rem">
</div>
core/columns
Multi-column layout container. Contains core/column blocks.
Attributes:
{
"verticalAlignment": "center",
"isStackedOnMobile": true
}
Supports:
align: full, wide
color: background, gradients, text, link
spacing: margin, padding, blockGap
layout: default (flex-based)
Markup:
<div class="wp-block-columns are-vertically-aligned-center">
<div class="wp-block-column" style="flex-basis:33.33%">
</div>
<div class="wp-block-column" style="flex-basis:66.66%">
</div>
</div>
core/column
Single column within columns block.
Attributes:
{
"verticalAlignment": "center",
"width": "50%",
"allowedBlocks": [],
"templateLock": false
}
core/row
Horizontal flex container. Items arranged in a row.
Attributes:
{
"verticalAlignment": "center",
"justifyContent": "left"
}
Markup:
<div class="wp-block-group">
</div>
core/stack
Vertical flex container. Items stacked vertically.
Markup:
<div class="wp-block-group">
</div>
core/cover
Image/video background with overlay and content.
Attributes:
{
"url": "image.jpg",
"id": 123,
"alt": "Description",
"hasParallax": false,
"isRepeated": false,
"dimRatio": 50,
"overlayColor": "black",
"customOverlayColor": "#000000",
"minHeight": 500,
"minHeightUnit": "px",
"contentPosition": "center center"
}
Supports:
align: full, wide, left, center, right
color: text, background (for overlay)
dimensions: aspectRatio, minHeight
spacing: margin, padding
layout: constrained
Markup:
<div class="wp-block-cover alignfull" style="min-height:500px">
<span aria-hidden="true" class="wp-block-cover__background has-black-background-color has-background-dim"></span>
<img class="wp-block-cover__image-background wp-image-123" alt="" src="hero.jpg" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
</div>
</div>
core/separator
Horizontal rule/divider.
Attributes:
{
"opacity": "alpha-channel"
}
Markup:
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
core/spacer
Vertical whitespace.
Attributes:
{
"height": "100px"
}
Markup:
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
Text Blocks
core/paragraph
Standard paragraph text.
Attributes:
{
"content": "Text content",
"dropCap": false,
"placeholder": "Type / to choose a block"
}
Supports:
color: background, gradients, text, link
spacing: margin, padding
typography: fontSize, lineHeight
Markup:
<p>Your paragraph content here.</p>
With styling:
<p class="has-text-color" style="color:#333333;font-size:18px">Styled paragraph.</p>
core/heading
Headings h1-h6.
Attributes:
{
"content": "Heading Text",
"level": 2,
"textAlign": "center"
}
Markup:
<h2 class="wp-block-heading has-text-align-center">Centered H2 Heading</h2>
core/list
Ordered or unordered lists.
Attributes:
{
"ordered": false,
"start": 1,
"reversed": false,
"type": "1"
}
Markup:
<ul class="wp-block-list">
<li>First item</li>
<li>Second item</li>
</ul>
core/quote
Blockquote with optional citation.
Attributes:
{
"citation": "Author Name"
}
Markup:
<blockquote class="wp-block-quote">
<p>Quote text here.</p>
<cite>Author Name</cite>
</blockquote>
core/table
Data tables.
Attributes:
{
"hasFixedLayout": true,
"caption": "Table caption",
"head": [{"cells": [{"content": "Header", "tag": "th"}]}],
"body": [{"cells": [{"content": "Cell", "tag": "td"}]}],
"foot": []
}
Markup:
<figure class="wp-block-table">
<table class="has-fixed-layout">
<thead>
<tr><th>Header 1</th><th>Header 2</th></tr>
</thead>
<tbody>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</tbody>
</table>
</figure>
core/code
Code snippets without syntax highlighting.
Markup:
<pre class="wp-block-code"><code>const hello = "world";</code></pre>
core/preformatted
Preformatted text preserving whitespace.
Markup:
<pre class="wp-block-preformatted"> Preserves
all whitespace</pre>
core/details
Collapsible details/summary.
Attributes:
{
"showContent": false,
"summary": "Click to expand"
}
Markup:
<details class="wp-block-details">
<summary>Click to expand</summary>
<p>Hidden content revealed on click.</p>
</details>
core/accordion (WordPress 6.9+)
Collapsible accordion sections.
Attributes:
{
"autoclose": false,
"headingLevel": 3,
"iconPosition": "end",
"showIcon": true
}
Markup:
<div class="wp-block-accordion">
<h3 class="wp-block-accordion-heading">Section Title</h3>
<div class="wp-block-accordion-panel">
</div>
</div>
Media Blocks
core/image
Single image with optional caption and link.
Attributes:
{
"id": 123,
"url": "image.jpg",
"alt": "Description",
"caption": "Image caption",
"href": "link.html",
"linkTarget": "_blank",
"linkClass": "",
"width": "600px",
"height": "auto",
"aspectRatio": "16/9",
"scale": "cover",
"sizeSlug": "large"
}
Supports:
align: full, wide, left, center, right
filter: duotone
shadow
border
Markup:
<figure class="wp-block-image size-large">
<img src="image.jpg" alt="Description" class="wp-image-123"/>
<figcaption class="wp-element-caption">Caption text</figcaption>
</figure>
Linked image:
<figure class="wp-block-image size-large">
<a href="https://example.com"><img src="image.jpg" alt="" class="wp-image-123"/></a>
</figure>
core/gallery
Image gallery with layout options.
Attributes:
{
"images": [],
"ids": [1, 2, 3],
"columns": 3,
"linkTo": "none",
"sizeSlug": "large",
"randomOrder": false
}
Markup:
<figure class="wp-block-gallery has-nested-images columns-3 is-cropped">
<figure class="wp-block-image"><img src="img1.jpg" alt="" class="wp-image-1"/></figure>
<figure class="wp-block-image"><img src="img2.jpg" alt="" class="wp-image-2"/></figure>
</figure>
core/video
Video player.
Attributes:
{
"id": 123,
"src": "video.mp4",
"poster": "poster.jpg",
"caption": "Video caption",
"autoplay": false,
"controls": true,
"loop": false,
"muted": false,
"playsInline": false,
"preload": "metadata"
}
Markup:
<figure class="wp-block-video">
<video controls src="video.mp4" poster="poster.jpg"></video>
</figure>
core/audio
Audio player.
Attributes:
{
"id": 123,
"src": "audio.mp3",
"caption": "Audio caption",
"autoplay": false,
"loop": false,
"preload": "none"
}
core/file
Downloadable file with button.
Attributes:
{
"id": 123,
"href": "file.pdf",
"fileName": "Document.pdf",
"textLinkHref": "file.pdf",
"textLinkTarget": "",
"showDownloadButton": true,
"downloadButtonText": "Download"
}
core/media-text
Two-column media and text layout.
Attributes:
{
"mediaId": 123,
"mediaUrl": "image.jpg",
"mediaType": "image",
"mediaPosition": "left",
"mediaWidth": 50,
"isStackedOnMobile": true,
"verticalAlignment": "center",
"imageFill": false
}
Markup:
<div class="wp-block-media-text is-stacked-on-mobile">
<figure class="wp-block-media-text__media">
<img src="image.jpg" alt="" class="wp-image-123 size-full"/>
</figure>
<div class="wp-block-media-text__content">
<p>Content beside media.</p>
</div>
</div>
Interactive Blocks
core/buttons
Button group container.
Attributes:
{
"layout": {
"type": "flex",
"justifyContent": "center"
}
}
Markup:
<div class="wp-block-buttons">
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button">Click Me</a></div>
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button">Secondary</a></div>
</div>
core/button
Single button (must be inside core/buttons).
Attributes:
{
"text": "Button Text",
"url": "https://example.com",
"linkTarget": "_blank",
"rel": "noopener noreferrer",
"width": 50,
"backgroundColor": "primary",
"textColor": "white"
}
Supports:
color: background, gradients, text
typography: fontSize, lineHeight
border: radius, color, width
spacing: padding
Markup with custom colors:
<div class="wp-block-button">
<a class="wp-block-button__link has-white-color has-primary-background-color has-text-color has-background wp-element-button" href="#">Primary Button</a>
</div>
core/search
Search form.
Attributes:
{
"label": "Search",
"showLabel": true,
"placeholder": "Search...",
"buttonText": "Search",
"buttonPosition": "button-inside",
"buttonUseIcon": false,
"width": 100,
"widthUnit": "%"
}
core/social-links
Social media icon links.
Attributes:
{
"iconColor": "white",
"iconColorValue": "#ffffff",
"iconBackgroundColor": "primary",
"iconBackgroundColorValue": "#0073aa",
"size": "has-normal-icon-size",
"openInNewTab": true,
"showLabels": false
}
Markup:
<ul class="wp-block-social-links has-icon-color has-icon-background-color">
</ul>
Query & Post Blocks (Theme Category)
core/query
Query loop for displaying posts.
Attributes:
{
"queryId": 0,
"query": {
"perPage": 10,
"pages": 0,
"offset": 0,
"postType": "post",
"order": "desc",
"orderBy": "date",
"author": "",
"search": "",
"exclude": [],
"sticky": "",
"inherit": true,
"taxQuery": null,
"parents"
Markup:
<div class="wp-block-query">
<p>No posts found.</p>
</div>
core/post-template
Template for each post in query. Contains the layout for individual posts.
core/post-title
Displays post title.
Attributes:
{
"level": 2,
"isLink": true,
"rel": "",
"linkTarget": "_self"
}
core/post-content
Displays full post content.
core/post-excerpt
Displays post excerpt.
Attributes:
{
"moreText": "Read more",
"showMoreOnNewLine": true,
"excerptLength": 55
}
core/post-featured-image
Displays post featured image.
Attributes:
{
"isLink": false,
"aspectRatio": "16/9",
"scale": "cover",
"sizeSlug": "post-thumbnail",
"width": "",
"height": ""
}
core/post-date
Displays post date.
Attributes:
{
"format": "",
"isLink": false
}
core/post-author
Displays post author.
Attributes:
{
"showAvatar": true,
"showBio": false,
"byline": "By",
"isLink": false,
"avatarSize": 48
}
core/post-terms
Displays post categories or tags.
Attributes:
{
"term": "category",
"separator": ", ",
"prefix": ""
}
Navigation Blocks
core/navigation
Site navigation menu.
Attributes:
{
"ref": 123,
"overlayMenu": "mobile",
"icon": "menu",
"hasIcon": true,
"openSubmenusOnClick": false,
"showSubmenuIcon": true
}
Supports:
color: background, text, link
typography: fontSize, fontFamily, fontWeight
spacing: margin, padding, blockGap
layout: flex
core/navigation-link
Navigation menu item.
Attributes:
{
"label": "Link Text",
"url": "/page/",
"description": "",
"kind": "post-type",
"type": "page",
"id": 123,
"opensInNewTab": false,
"isTopLevelLink": true
}
core/page-list
Auto-generated list of pages.
Attributes:
{
"parentPageID": 0,
"isNested": false
}
Widget Blocks
core/latest-posts
Displays recent posts.
Attributes:
{
"categories": [],
"selectedAuthor": "",
"postsToShow": 5,
"displayPostContent": false,
"displayPostContentRadio": "excerpt",
"excerptLength": 55,
"displayAuthor": false,
"displayPostDate": false,
"displayFeaturedImage": false,
"featuredImageAlign": "left",
"featuredImageSizeSlug": "thumbnail",
"addLinkToFeaturedImage": false,
"postLayout": "list",
Markup (dynamic block):
core/archives
Archive links by date.
Attributes:
{
"displayAsDropdown": false,
"showLabel": true,
"showPostCounts": false,
"type": "monthly"
}
core/categories
Category list.
Attributes:
{
"displayAsDropdown": false,
"showHierarchy": false,
"showPostCounts": false,
"showOnlyTopLevel": false,
"showEmpty": false
}
core/tag-cloud
Tag cloud.
Attributes:
{
"numberOfTags": 45,
"taxonomy": "post_tag",
"showTagCounts": false,
"smallestFontSize": "8pt",
"largestFontSize": "22pt"
}
core/calendar
Calendar showing posts by date.
Markup (dynamic block):
core/rss
RSS feed display.
Attributes:
{
"feedURL": "https://example.com/feed/",
"itemsToShow": 5,
"displayExcerpt": false,
"displayAuthor": false,
"displayDate": false,
"blockLayout": "list",
"columns": 2
}
Site Blocks (Theme Category)
core/site-title
Displays site title.
Attributes:
{
"level": 1,
"isLink": true,
"linkTarget": "_self"
}
core/site-tagline
Displays site tagline.
core/site-logo
Displays site logo.
Attributes:
{
"width": 120,
"isLink": true,
"linkTarget": "_self",
"shouldSyncIcon": true
}
core/template-part
Reusable template part (header, footer, etc.).
Attributes:
{
"slug": "header",
"theme": "theme-name",
"tagName": "header",
"area": "header"
}
core/post-comments-form
Comments form.
core/comments
Comments display.
Common Style Attributes
All blocks support these style patterns:
Spacing
{
"style": {
"spacing": {
"margin": {"top": "2rem", "bottom": "2rem"},
"padding": {"top": "1rem", "right": "1rem", "bottom": "1rem", "left": "1rem"},
"blockGap": "1rem"
}
}
}
Colors
{
"style": {
"color": {
"background": "#ffffff",
"text": "#333333",
"gradient": "linear-gradient(135deg,#667eea 0%,#764ba2 100%)"
}
},
"backgroundColor": "primary",
"textColor": "contrast"
}
Typography
{
"style": {
"typography": {
"fontSize": "1.25rem",
"fontWeight": "600",
"lineHeight": "1.5",
"letterSpacing": "0.02em",
"textTransform": "uppercase"
}
},
"fontSize": "large"
}
Border
{
"style": {
"border": {
"color": "#e0e0e0",
"style": "solid",
"width": "1px",
"radius": "8px"
}
}
}
Shadow
{
"style": {
"shadow": "0 4px 6px rgba(0,0,0,0.1)"
}
}
Block Variations
Some blocks have built-in variations:
Group variations:
group - Default constrained layout
group-row - Horizontal flex layout
group-stack - Vertical flex layout
Columns variations:
two-columns-equal - 50/50 split
two-columns-one-third-two-thirds - 33/66 split
two-columns-two-thirds-one-third - 66/33 split
three-columns-equal - 33/33/33 split
Embed variations:
Each embed service is a variation of core/embed (YouTube, Vimeo, Twitter, etc.)
Dynamic vs Static Blocks
Static Blocks
Markup saved in post content. Block validates on load.
core/paragraph, core/heading, core/image, core/group, core/columns
Dynamic Blocks
Server-rendered. Only attributes saved.
core/latest-posts, core/archives, core/calendar, core/query
- All theme blocks (
core/site-title, core/post-title, etc.)
Dynamic block markup:
Static block markup:
<p>Content here</p>
Resources