Guide

Facets Context Provider

Parent container that manages facet state and provides context to child facet blocks. Required on the page for facets to function.

Namespace

prc-ep/facets-context-provider

Category

theme

Supports

FeatureValue
Anchorfalse
HTMLfalse
Reusablefalse
Multiplefalse (one instance per page area)
InteractivityclientNavigation: true

Attributes

None. The block detects context from the page template.

Context

Uses: postType, templateSlug, previewPostType, facetsContextProvider

Provides: facet state and configuration to children, including selected values, query parameters, and provider state (isDisabled when ES is degraded).

Usage

<!-- wp:prc-ep/facets-context-provider -->
<!-- wp:prc-ep/facet-template /-->
<!-- wp:query /-->
<!-- wp:prc-ep/facets-results-info /-->
<!-- /wp:prc-ep/facets-context-provider -->

Client state uses the WordPress Interactivity API. Temporary aliases keep old prc-platform/facet* names rendering until stored templates are re-saved.

Was this helpful?