Skip to main content

Core Blocks

Yoko Core adds functionality to some existing core blocks.

Core/LoginLogout Block

Yoko Core adds a few options to the core Login/Logout block to make SSO integration and header customization easier.

Login/Logout Block Yoko Options

  1. Custom Login Text - Set custom Login text when the user is logged out.
  2. Custom Logout Text - Set custom Logout text when the user is logged in.
  3. Login Action Parameter - ADVANCED FUNCTIONALITY!! - This allows for the button to set a custom action paremeter for the login request. Most of our SSO use the same login URL as the main WP Login, but trigger a different login flow based on the action parameter. For example, AMS Connect frequently uses the action=amsc_login parameter to trigger its login flow. To link this login button to it's flow, you would just put amsc_login into the custom action parameter field.
NOTE: The text will not change in the Gutenberg editor for now.

The text will only render differently on the front end of the site.

Core/Navigation Block

Show Child Pages

The "Show Child Pages" setting on the core/navigation block will replace the whole menu with the child posts of the current page/post. This is useful for micro-sites or complex posts like large events.

Show Child Pages Option on Core Navigation Block

Since all of the navigation links will be replaced by the page children, you can populate this menu in Gutenberg with placeholder menu items so that the template layout looks complete. The first item in the menu will also be used for determining the styles of the child page navigation menu items.;

Options

  1. Show Child Pages - Turning this on will populate this navigation block with the direct children of the rendered page, ordered by menu_order.
  2. Show Parent Page - Turning this on will add a link to the navigation menu to the parent page at the very beginning of the menu.
  3. Parent Page Label - This will be the label of the parent page navigation item. Leave this blank to use the title of the parent page.

Styling

In order to style the block, you can add a custom menu and make all of the configurations you need. As long as this options is set, this block will override that menu with the direct child posts of the displayed post.

The menu item styles will be automatically inherited from the first menu item.

Limitations

As of Yoko Core Version 1.10.0, this feature will only work for top level heirarchical pages and only it's direct descendants. It is not, for example, compatible with grandchildren or Relational Taxonomy children.

Core/Post-Terms Block

Yoko Core extends the core/post-terms block with additional display and formatting options.

The "No Links" option removes clickable links from terms while maintaining all visual styling. This is useful when you want to display terms as labels without navigation.

How it works:

  • Converts anchor tags (<a>) to span tags (<span>)
  • Preserves all CSS classes, styles, and data attributes
  • Maintains visual consistency with linked terms

Limit Number of Terms

Released in version 1.17.0

See the 1.17.0 release notes for more information.

The "Limit Number of Terms Rendered?" option controls how many terms are displayed when a post has many terms in a taxonomy. This is particularly useful for post cards with limited space.

Options

  1. Limit Number of Terms Rendered? - Toggle to enable term limiting features. When enabled, reveals additional controls.

  2. Number of Terms to Render - The maximum number of terms to display before truncating. Default is 3.

  3. More Text - Text displayed when terms are truncated. Use {count} as a placeholder for the number of hidden terms. Default is "+ {count} More".

    • Example: "+ {count} More" becomes "+ 5 More" when 5 terms are hidden
    • Example: "and {count} others" becomes "and 3 others" when 3 terms are hidden
  4. Sort Terms By - Determines the order in which terms are displayed before limiting. Options:

    • Name (Ascending) - Alphabetical order A-Z (default)
    • Name (Descending) - Reverse alphabetical order Z-A
    • Count - By post count (terms used most frequently appear first)
  5. Show First - Comma-separated list of term names or slugs that should always appear first if they exist. Useful for highlighting important categories.

    • Example: "Featured, Important, Top"
    • Matching is case-insensitive and works with both term names and slugs

How Limiting Works

  1. All terms are first sorted according to the "Sort Terms By" option
  2. Priority terms (from "Show First") are moved to the front
  3. Only the specified number of terms are displayed
  4. If terms are hidden, the "More Text" is appended with the count of hidden terms

Example Use Cases

Post Cards with Many Categories:

Settings:
- Limit: 3
- Sort: Name (Ascending)
- More Text: "+ {count} More"

Result: "Business, Design, Technology + 4 More"

Highlighting Featured Content:

Settings:
- Limit: 2
- Show First: "Featured, Sponsored"
- Sort: Name (Ascending)

Result: "Featured, Business + 5 More"
(Even if "Featured" would normally be sorted later alphabetically)

Most Popular Tags:

Settings:
- Limit: 5
- Sort: Count
- More Text: "and {count} others"

Result: "wordpress, php, javascript, react, css and 12 others"
(Shows the 5 most-used tags first)

Compatibility

  • Works seamlessly with the "No Links" option
  • Both features can be enabled simultaneously
  • When both are enabled, limiting is applied first, then links are converted to spans

Technical Notes

  • The feature parses and rebuilds the block HTML on the server side
  • Preserves all term attributes and styling
  • Uses case-insensitive matching for "Show First" terms
  • Gracefully handles edge cases (no terms, fewer terms than limit, etc.)

Core/Query Block

Query ID Display

Released in version 1.17.1

Yoko Core exposes the auto-assigned queryId attribute in the block editor's Advanced panel for core/query blocks. This read-only field helps developers identify which query block to target when writing custom PHP filters.

WordPress automatically assigns a unique numeric ID to each query block on a page, but this ID is not visible in the editor by default. This feature surfaces it so developers don't have to inspect the page source to find it.

How to Use

  1. Add or select a Query Loop block in the editor
  2. Open the Advanced panel in the block inspector (right sidebar)
  3. The Query ID field displays the auto-assigned ID

Use Case: Custom Query Filters

When writing PHP filters that target a specific query block, you need the queryId to scope your filter. For example, with the Content Blocks Builder or custom query modifications:

add_filter( 'query_loop_block_query_vars', function( $query, $block ) {
// Only modify query block with ID 3
if ( isset( $block->context['queryId'] ) && 3 === $block->context['queryId'] ) {
$query['post_type'] = 'event';
}
return $query;
}, 10, 2 );

The Query ID displayed in the Advanced panel is the value you would reference in your filter.

Technical Notes

  • The Query ID is assigned automatically by WordPress when a query block is added to a page
  • The field is read-only -- the ID cannot be changed manually
  • This is an editor-only feature with no frontend output
  • If no Query ID has been assigned yet, an em dash (--) is displayed