Link list
Display one or more links in a neatly organized list.
Block names
t2/link-list
, t2/link-list-item
Customizing link color
By default the link list follows the global link color, but with theme.json
its possible to change it:
{
"styles": {
"blocks": {
"t2/link-list": {
"elements": {
"link": {
"color": {
"text": "#000000"
}
}
}
}
}
}
}
Properties (t2.json)
Content icon size.
layout.icons
Icon used before a link. The icon need to be registered as a T2 icon.
Icon used before a external link. The icon need to be registered as a T2 icon.
Icon used before a link to an attachment. If no icon is defined it will fallback to the default icon/external icon.
layout
Icon position. Choose between
left
,right
, 'inline-left' or 'inline-right'.Icon size.
features
Add an custom content icon.
Allowed content icon list.
Add description under the link title
Supports columns
allowedFormats
string[]Allowed RichText formats.
Style properties
Link text font size
- --t2-link-list-typography-text-font-size
- Theme.json: wp.custom.t2-link-list.typography.text-font-size
- Default: 1.125rem
Link text font weight
- --t2-link-list-typography-text-font-weight
- Theme.json: wp.custom.t2-link-list.typography.text-font-weight
- Default: 700
Link description font size
- --t2-link-list-typography-description-font-size
- Theme.json: wp.custom.t2-link-list.typography.description-font-size
- Default: 1rem
Item gap
- --t2-link-list-spacing-item-gap
- Theme.json: wp.custom.t2-link-list.spacing.item-gap
- Default: 1.75rem
Auto item minimum width
- --t2-link-list-spacing-item-gap
- Theme.json: wp.custom.t2-link-list.size.min-width
- Default: 250px
Icon color
- --t2-link-list-icon-color
- Theme.json: wp.custom.t2-link-list.icon-color
- Default: currentColor
PHP Filters
apply_filters( 't2/block/link_list/icon', string $icon, array $attributes )
Allow overriding icon based on values from attributes.
Parameter | Type | Description |
---|---|---|
$icon | string | Icon name. |
$attributes | array | Block attributes. |