Function: aioseo_breadcrumbs()

You can use this code snippet in your child theme to render the breadcrumb trail for the current page:

<?php if( function_exists( 'aioseo_breadcrumbs' ) ) aioseo_breadcrumbs(); ?>

The aioseo_breadcrumbs() function needs to run after the queried object (post, term or archive) has been loaded; otherwise All in One SEO is not able to determine the context of the current page. If the function is called before the object is loaded, nothing will be rendered.

Code Example

The code snippet below illustrates how you can use the aioseo_breadcrumbs() function in your theme. In this example, the breadcrumb trail is rendered right above the site header.

<!doctype html>
<html <?php language_attributes(); ?> <?php twentytwentyone_the_html_classes(); ?>>
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<?php wp_head(); ?>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'twentytwentyone' ); ?></a>

		if ( function_exists( 'aioseo_breadcrumbs' ) ) aioseo_breadcrumbs(); 
		get_template_part( 'template-parts/header/site-header' );

	<div id="content" class="site-content">
		<div id="primary" class="content-area">
			<main id="main" class="site-main" role="main">

There is no legacy documentation for this as it was added in All in One SEO v4.1.1.