php – Getting error when trying to implement site-wide breadcrumbs in Twentytwentyone Theme

Question

I’ve purchased the Yoast SEO Premium plugin earlier this year, but I wasn’t able to figure out how to enable breadcrumbs until a few days ago. At first I thought I had to add blocks to every page and post, and I thought that would b incredibly tedious, until I found this article

Since I was already using the Twentytwentyone theme, I decided to add the code to its header.php file.

<?php

if ( function_exists(‘yoast_breadcrumb’) ) {
  yoast_breadcrumb( ”,’

‘ );
}
?>

When I went to reload the site to see if the breadcrumbs showed up, I got a critical error, so I went into my log and saw this error.

[Sun Oct 03 02:32:59.026295 2021] [php7:error] [pid 8225] [client 172.68.133.221:44594] PHP Fatal error:  Uncaught Error: Call to undefined function xc2xa0xc2xa0yoast_breadcrumb() in /var/www/html/sensation-experience.com/public_html/wp-content/themes/twentytwentyone/header.php:35nStack trace:n#0 /var/www/html/sensation-experience.com/public_html/wp-includes/template.php(770): require_once()n#1 /var/www/html/sensation-experience.com/public_html/wp-includes/template.php(716): load_template('/var/www/html/s...', true, Array)n#2 /var/www/html/sensation-experience.com/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)n#3 /var/www/html/sensation-experience.com/public_html/wp-content/themes/twentytwentyone/page.php(12): get_header()n#4 /var/www/html/sensation-experience.com/public_html/wp-includes/template-loader.php(106): include('/var/www/html/s...')n#5 /var/www/html/sensation-experience.com/public_html/wp-blog-header.php(19): require_once('/var/www/html/s...')n#6 /var/www/html/sensation-experience.com/public_html/index.php(17): require('/var/www/html/s...')n#7 {main}n  thrown in /var/www/html/sensation-experience.com/public_html/wp-content/themes/twentytwentyone/header.php on line 35, referer: https://www.sensation-experience.com/

From what it looks like, there seems to be something going on betwen the Yoast plugin and the theme, but I’m not sure what it could be.

0
HeavenlyHarmony 2 months 2021-10-03T04:35:31-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse