</> ConvertAtlas Developer Tools
Content & On-Page

Auto Breadcrumbs

Accessible breadcrumb navigation via a shortcode or template tag — lightweight and styleable.

Download plugin v1.0.0 Requires 5.5+ Tested 6.5 GPL-2.0

Auto Breadcrumbs adds a clean, accessible breadcrumb trail to your site using either the [ca_breadcrumbs] shortcode or the ca_breadcrumbs() template tag. It builds the right trail for posts (with category), nested pages, taxonomies, archives, search and 404 pages, marks the current page with aria-current, and ships with minimal default styling you can override. Breadcrumbs help users orient themselves and give search engines clearer site structure.

Features

Shortcode [ca_breadcrumbs] and template tag ca_breadcrumbs()
Correct trails for posts, nested pages, taxonomies, archives, search and 404
Accessible: aria-label and aria-current on the current item
Minimal default CSS, easy to override in your theme
No settings page or database tables
Works with any theme

Installation

  1. Download auto-breadcrumbs.php below.
  2. Upload to wp-content/plugins/, or zip and upload via Plugins → Add New.
  3. Activate the plugin.
  4. Add [ca_breadcrumbs] to a post/page, or place <?php ca_breadcrumbs(); ?> in your theme template.

What’s inside

This plugin is open source under the GPL. Here is the start of the file — download it for the complete, ready-to-use plugin.

php
<?php
/**
 * Plugin Name:       Auto Breadcrumbs by ConvertAtlas
 * Plugin URI:        https://convertatlas.org/en/wordpress/auto-breadcrumbs
 * Description:       Accessible breadcrumb navigation via the [ca_breadcrumbs] shortcode or ca_breadcrumbs() template tag. Lightweight, schema-friendly and styleable.
 * Version:           1.0.0
 * Requires at least: 5.5
 * Requires PHP:      7.4
 * Author:            ConvertAtlas
 * Author URI:        https://convertatlas.org
 * License:           GPL-2.0-or-later
 * Text Domain:       ca-breadcrumbs
 *
 * Built with convertatlas.org — free developer tools & templates.
 */

if (!defined('ABSPATH')) { exit; }

final class CA_Breadcrumbs {

    public static function init() {
        $self = new self();
        add_shortcode('ca_breadcrumbs', array($self, 'shortcode'));
        add_action('wp_head', array($self, 'styles'));
    }

    public function shortcode($atts) {
        return $this->build();
    }

    public function build() {
        if (is_front_page()) return '';
        $sep = '<span class="ca-bc-sep" aria-hidden="true">›</span>';
        $items = array();
        $items[] = '<a href="' . esc_url(home_url('/')) . '">Home</a>';

        if (is_singular()) {
            $post = get_queried_object();
            if (is_singular('post')) {
                $cats = get_the_category($post->ID);
                if (!empty($cats)) {
                    $cat = $cats[0];
/* … download the file for the full source … */

Frequently asked questions

How do I show breadcrumbs in my theme?

Use the shortcode [ca_breadcrumbs] inside content, or call the template tag ca_breadcrumbs() in a theme file such as single.php or page.php where you want the trail to appear.

Can I change the separator or styling?

Yes. The separator is a small markup span and the default CSS is printed in the head; override .ca-breadcrumbs in your theme stylesheet, or edit the plugin directly.

Does it output breadcrumb schema?

This plugin renders the visible trail. For BreadcrumbList JSON-LD, pair it with the Schema Article JSON-LD plugin, which emits the structured data.

Is it accessible?

Yes — the trail is wrapped in a nav with aria-label="Breadcrumb" and the current page uses aria-current="page", following common accessibility patterns.

Open source & self-containedBuilt with convertatlas.org. No external requests, no tracking, GPL-licensed — audit and modify it freely.