Blocks
Accordion
Show (and hide) content in a listByline
Post author and post infoFactbox
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 gridFiles
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 valuesProduct Hero
Wow your readers with a great introduction to your articlesQuery
Query loop block enhanced, with AJAX loading, filters and pagination.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 customersWrapper
A wrapper block that only returns a wrapper element.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 )
Parameter | Type | Description |
---|---|---|
$override |
string|null |
Template override to return. Default null. |
$attributes |
array |
Block attributes passed to the block. |
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. |