Search


Help visitors find your content.

  • Name: core/search
  • Category: widgets
  • API Version: 3
  • Block Type: Dynamic (server-rendered)
  • Keywords: find

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
label string Role: content
showLabel boolean true
placeholder string "" Role: content
width number
widthUnit string
buttonText string Role: content
buttonPosition string "button-outside"
buttonUseIcon boolean false
query object {}
tagName string ""

Supports

Defined via the supports property in block.json.

CSS Selectors

Defined via the selectors property in block.json.

  • color: .wp-block-search .wp-block-search__button, .wp-block-search.wp-block-search__no-button .wp-block-search__input
  • border: .wp-block-search.wp-block-search__button-outside .wp-block-search__input, .wp-block-search.wp-block-search__button-outside .wp-block-search__button, .wp-block-search.wp-block-search__no-button .wp-block-search__input, .wp-block-search.wp-block-search__button-only .wp-block-search__input, .wp-block-search.wp-block-search__button-only .wp-block-search__button, .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper

Block Markup

This is a dynamic block. It is rendered on the server and does not save HTML in post content.

In post content, it is stored as a block comment:

<!-- wp:search /-->

Source