Display icons linking to your social profiles or sites.
- Name:
core/social-links - Category: widgets
- API Version: 3
- Block Type: Static (saved in post content)
- Keywords:
links
Block Relationships
Allowed inner blocks:
– core/social-link
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
iconColor |
string |
— | — |
customIconColor |
string |
— | — |
iconColorValue |
string |
— | — |
iconBackgroundColor |
string |
— | — |
customIconBackgroundColor |
string |
— | — |
iconBackgroundColorValue |
string |
— | — |
openInNewTab |
boolean |
false |
— |
showLabels |
boolean |
false |
— |
size |
string |
— | — |
Supports
Defined via the supports property in block.json.
align:"left","center","right"anchor:truehtml:falselayout:allowSwitching:falseallowInheriting:falseallowVerticalAlignment:falsedefault:{"type":"flex"}
color:enableContrastChecker:falsebackground:truegradients:truetext:false
spacing:blockGap:["horizontal","vertical"]margin:truepadding:trueunits:["px","em","rem","vh","vw"]
interactivity:clientNavigation:true
contentRole:truelistView:true
Context
Defined via the usesContext and providesContext properties in block.json.
Provides context:
openInNewTabattributeopenInNewTabshowLabelsattributeshowLabelsiconColorattributeiconColoriconColorValueattributeiconColorValueiconBackgroundColorattributeiconBackgroundColoriconBackgroundColorValueattributeiconBackgroundColorValue
Block Styles
Defined via the styles property in block.json.
| Style Name | Label | Default |
|---|---|---|
default |
Default | Yes |
logos-only |
Logos Only | No |
pill-shape |
Pill Shape | No |
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:social-links -->
<ul class="wp-block-social-links"><!-- wp:social-link {"service":"mastodon","url":"https://mastodon.social/@marcuskaz"} /--></ul>
<!-- /wp:social-links -->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.