breadcrumbspress_post
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
Display a breadcrumb trail for a specific post or page. This shortcode is available in BreadcrumbsPress Lite and Pro. Add it to a Shortcode block or another shortcode-enabled area.
The definition illustrates selected attributes; all supported attributes and their defaults are listed above.
Basic usage
[breadcrumbspress_post post="123"]
Replace 123 with the ID of a readable post or page. If post is omitted or set to 0, WordPress uses the current global post when one is available. An unavailable or unreadable post produces no trail.
Choose a taxonomy-based path
[breadcrumbspress_post post="123" path="taxonomy" taxonomy="category"]
This requests a category-based path for post 123. Use a taxonomy registered for the post type and assigned to the post. The result depends on the post type and its available terms; the plugin falls back to another path when the requested path cannot be built.
Customize the output
[breadcrumbspress_post post="123" 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. Without these attributes, the list type and structured data follow the plugin settings. Check for duplicate trails or structured data when another integration is active.