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


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.


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] PHP Fatal error:  Uncaught Error: Call to undefined function xc2xa0xc2xa0yoast_breadcrumb() in /var/www/html/ trace:n#0 /var/www/html/ require_once()n#1 /var/www/html/ load_template('/var/www/html/s...', true, Array)n#2 /var/www/html/ locate_template(Array, true, true, Array)n#3 /var/www/html/ get_header()n#4 /var/www/html/ include('/var/www/html/s...')n#5 /var/www/html/ require_once('/var/www/html/s...')n#6 /var/www/html/ require('/var/www/html/s...')n#7 {main}n  thrown in /var/www/html/ on line 35, referer:

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.

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

Leave an answer