breadcrumbspress_current
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
Definition
Attributes
Output
Use this shortcode to display a breadcrumb trail for the current request. It is available in BreadcrumbsPress Lite and Pro. Add it to a Shortcode block or another shortcode-enabled area.
Basic usage
[breadcrumbspress_current]
With no attributes, the shortcode uses the plugin’s settings for the list type and structured data and normally respects the visibility settings for the current page type. All attributes shown in the definition are optional; the values shown there illustrate the syntax and are not necessarily your site’s defaults.
Override visibility
[breadcrumbspress_current force="true"]
This bypasses the normal visibility check for this shortcode. Use it when the trail should appear even if the current page type is normally hidden.
Customize the output
[breadcrumbspress_current list="ul" rich_snippet="false" class="my-trail"]
This uses an unordered list, disables JSON-LD for this shortcode, and adds a CSS class to the trail. If another theme or plugin integration already displays breadcrumbs or structured data on the page, check for duplicate output.