Blocks
Byline
Post author and post infoCover Scroll
A parallax-style block that creates smooth scrolling effects with layered content.Factbox
Add facts in a wrapped boxFAQ
List frequently asked questions in an accordion layout. SEO-friendly out of the box with schema support.Featured Content
Add featured content in a layout gridFeatured Query Post
Show featured post inside template loopFeatured Single Post
Highlight a single postFeatured Template Post
Show featured post inside template loopFiles
Downloadable filesGallery
Display multiple images in a rich galleryHero
Wow your readers with a great introduction to your articlesIcon
Displays an icon.Image Carousel
Add multiple images in a carouselImage Compare
Compare two images with a dividing sliderInfobox
Add info in a wrapped box with a iconIntro Hero
Example block description.Lead paragraph
Adds a lead paragraph blockLink list
Display one or more links in a neatly organized list.Logo Showcase
Show off logos in a neat gridMono Hero
Hero block with background image and one content blockNav Menu
Displays a navigation menu.Overflow Separator
Position content independently of block bordersPost Dynamic Part
Displays a post label from a post type, meta, term, attribute, static text, or even a custom PHP filter.Post Meta Text
Display post meta valuesQuery alternatives
Alternatives to the deprecated T2 Query block.Section
Wow your readers with a great introduction to your articlesSelling Points
Display useful information in a neat grid.Simple Media & Text
Set media and words side-by-side for a richer layout.Spacer
Add custom block spacing between blocks.State Toggle
Display a button for toggeling visibility for any element; menu, search field, filters etc.Statistics
Add a grid of statistics you want to show offT2 Featured image
Helper block for displaying featured images.Tabs
Display related content in a compact tabTestimonials
Show off your proud customersTitle Content
A flexible content block that combines headings with rich content areas, perfect for creating structured sections with consistent typography and spacing.Wrapper
A wrapper block that only returns a wrapper element.Deprecated Blocks
The following blocks are deprecated and should not be used in new projects. Please refer to each block's documentation for migration guidance.
Accordion
Show (and hide) content in a list. Deprecated since version 8.22.0 in favor of Core Accordion introduced in WordPress 6.9.Footer (deprecated)
A deprecated footer block for displaying site-wide footer content. Use custom footer template parts instead. Deprecated since version 8.17.0Product Hero (deprecated)
Deprecated since version 8.8.0. Use Media & Text, Cover or Mono Hero instead.Query (deprecated)
Deprecated since version 8.18.0. See "Query alternatives" in the documentation for alternatives.Hooks
blocks/src/blocks.php
Block arguments
apply_filters( 't2/block/args', array $args, string $block_name )| Parameter | Type | Description |
|---|---|---|
$args |
array |
Block arguments. |
$block_name |
string |
Block name. |
Block arguments
apply_filters( 't2/block/$block_name/args', array $args )| Parameter | Type | Description |
|---|---|---|
$args |
array |
Block arguments. |
Available blocks
apply_filters( 't2/blocks/available', array $blocks )| Parameter | Type | Description |
|---|---|---|
$blocks |
array |
Blocks. |
blocks/src/featured-content/index.php
Short-circuit the template-fetching logic if a value is returned.
apply_filters( 't2/block/featured_content/pre_get_template', string|null $override, array $attributes, array $context )| Parameter | Type | Description |
|---|---|---|
$override |
string|null |
Template override to return. Default null. |
$attributes |
array |
Block attributes passed to the block. |
$context |
array |
Block context. |
T2 Featured Content Post Classes.
This filter allows you to modify the classes applied to the featured content post.
apply_filters( 't2/block/featured_content/post_classes', array $classes, \WP_Post $post )| Parameter | Type | Description |
|---|---|---|
$classes |
array |
Array of classes to apply to the post. |
$post |
\WP_Post |
The post object. |