Social Icons


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.

Context

Defined via the usesContext and providesContext properties in block.json.

Provides context:

  • openInNewTab attribute openInNewTab
  • showLabels attribute showLabels
  • iconColor attribute iconColor
  • iconColorValue attribute iconColorValue
  • iconBackgroundColor attribute iconBackgroundColor
  • iconBackgroundColorValue attribute iconBackgroundColorValue

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