Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.
- Name:
core/home-link - Category: design
- API Version: 3
- Block Type: Hybrid (static save + server enhancements)
Block Relationships
Parent blocks (direct):
– core/navigation
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
label |
string |
— | Role: content |
opensInNewTab |
boolean |
false |
— |
description |
string |
— | — |
Supports
Defined via the supports property in block.json.
anchor:truereusable:falsehtml:falsetypography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
textColorcustomTextColorbackgroundColorcustomBackgroundColorfontSizecustomFontSizestyle
Block Markup
This is a hybrid block. It saves static markup that the server may enhance during rendering.
<!-- wp:home-link {"label":"Home"} /-->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.