breadcrumbspress_current

Developer Knowledge Level

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
[breadcrumbspress_current force="false" rich_snippet="true" list="ol" id="" class="" /]
Attributes
Name
Type
Description
Default
force
boolean
Bypass the normal visibility check when true.
false
rich_snippet
boolean
Include breadcrumb JSON-LD structured data when true.
Plugin setting
list
string
Choose an ordered list (ol) or an unordered list (ul).
Plugin setting
id
string
HTML ID for the rendered breadcrumb trail.
Empty
class
string
Additional CSS class for the rendered breadcrumb trail.
Empty
Output
The current breadcrumb trail as HTML, optionally with JSON-LD. When no trail is rendered, the shortcode wrapper remains empty.

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.

Rate this reference
0
0
2

You are not allowed to rate this post.

Leave a Comment

0
0
0
0
0
0
0
0
0