Overview

Displays a navigational breadcrumb trail showing the current page’s position within the site hierarchy.

  • Block name: method/bc
  • Category: method-component-blocks
  • Supports: align (wide, full)
  • Render type: Dynamic (PHP render_callback)
  • Inner blocks: No

Usage

The Breadcrumb block renders a dynamic breadcrumb trail based on the current page’s position within the site. The trail structure is determined by Method’s theme options (method_options), which control separator characters, home link inclusion, current item display, and per‑post‑type/taxonomy parent behaviors.

Insert the block in a header template part or at the top of a page template. The editor shows a static placeholder with three sample items. The actual breadcrumb trail is generated server‑side.


Attributes

AttributeTypeDefaultDescription
responsiveSettingsobject(standard breakpoints)Spacing, alignment, gap, and color per breakpoint

Control Sets

ComponentPanelBreakpointsNotes
MethodAlignmentControlsAlignmentbase, mobile, tablet, widealignItems, justifyContent
MethodSpacingControlsSpacingbase, mobile, tablet, widePadding (all sides), Margin (top/bottom), Gap (horizontal/vertical)
MethodColorControlsColorsglobaltextColor, linkColor
MethodResponsiveTabsResponsivemobile, tablet, wide—
MethodStyleTag——Scoped editor styles

Data

The breadcrumb trail is built entirely server‑side from the method_options option. Key option fields:

Option KeyDescription
bc_sepSeparator character (default: /)
bc_homeWhether to include a “Home” link at the start
bc_currentWhether to include the current page/post as the final item
bc_sep_inclusionWhether to show the separator after the last item
bc_{post_type}_behaviorParent trail behavior: a page ID (walks up hierarchy) or archive_{cpt} (links to archive)
bc_{post_type}_archiveWhether to include the post type archive in the trail
bc_{post_type}_labelCustom label for the post type archive link
bc_{taxonomy}_behaviorParent trail behavior for taxonomy archives

Custom title override

Both posts and terms support a custom breadcrumb title via meta:

  • Posts/pages: _method_bc_title post meta
  • Terms: _method_bc_title term meta

When set, this overrides the default get_the_title() / $term->name in the breadcrumb trail.


Trail building logic

The PHP render callback determines the trail based on the current page type:

ContextTrail Logic
is_singular()Resolves configured behavior → optional archive link → page ancestors → current item
is_tax() / is_category() / is_tag()Resolves configured behavior → term ancestors → current term
is_post_type_archive()Resolves configured behavior → current archive
is_home()Blog page title
is_page()Page ancestors → current page
is_search()“Search Results”
is_404()“Not Found”

Frontend Rendering

HTML
<nav class="wp-block-method-bc" aria-label="Breadcrumb">
  <ol class="method-breadcrumb-list">
    <li class="method-breadcrumb-item">
      <a href="/">Home</a>
      <span class="method-breadcrumb-sep" aria-hidden="true">/</span>
    </li>
    <li class="method-breadcrumb-item">
      <a href="/parent/">Parent Page</a>
      <span class="method-breadcrumb-sep" aria-hidden="true">/</span>
    </li>
    <li class="method-breadcrumb-item">
      <span aria-current="page">Current Page</span>
    </li>
  </ol>
</nav>

The current (final) item renders as a <span aria-current="page"> instead of a link. Separator visibility on the last item is controlled by the bc_sep_inclusion option.


Filters

This block does not currently expose dedicated PHP filters for trail modification. Trail behavior is configured entirely through the method_options option page. CSS customization targets #method-{id} selectors and the .method-breadcrumb-* class structure.