Hero
Wow your readers with a great introduction to your articles
Last modified: September 12, 2023
Block name
t2/hero
PHP Filters
apply_filters( 't2/block/hero/image', string $image_wrapper, array $attributes )
Filter the image used for the hero image. Since 1.2.1
Parameter | Type | Description |
---|---|---|
$image_wrapper | string | The image wrapper. |
$attributes | array | Block attributes. |
apply_filters( 't2/block/hero/image/size', string $size, array $attributes )
Filter the image size used for the hero image. Since 3.0.0
Parameter | Type | Description |
---|---|---|
$size | string | Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). |
$attributes | array | Block attributes. |
Properties (t2.json)
allowedBlocks
string[]Allowed innerblocks
Innerblock template
Style properties
Gap
- --t2-hero-spacing-gap
- Theme.json: wp.custom.t2-hero.spacing.gap
- Default: 1rem
Padding
- --t2-hero-spacing-padding
- Theme.json: wp.custom.t2-hero.spacing.padding
- Default: 1rem
Min Height
- --t2-hero-min-height
- Default: 25rem
Dim
- --t2-hero-dim
- Default: 0.5