[Content Hidden]
[Content Hidden]
Hey Eric,
I’ve split your reply into a new topic but pasted the thread where we got the code from. The syntax error you get is because the word function is missing the letter ‘n’ on line 18, static public fuction eric_add_breadcrumbs() {
. Second, you need to place the code inside the helper class. Using your code, your file should look like this.
<?php
/**
* Helper class for theme functions.
*
* @class FLChildTheme
*/
final class FLChildTheme {
/**
* @method styles
*/
static public function stylesheet()
{
echo '<link rel="stylesheet" href="' . FL_CHILD_THEME_URL . '/style.css" />';
}
static public function eric_add_breadcrumbs() {
if ( function_exists('yoast_breadcrumb') && !is_front_page() ) {
yoast_breadcrumb('<div class="container"><p id="breadcrumbs">','</p></div>');
}
}
}
Hope this helps!
Ben
Thanks Ben,
I did fix the “n” issue, but that problem was still there. Was it because I didn’t close it out completely at the end?
No problem, Eric! Your code was closed completely. The problem was it wasn’t inside the helper class final class FLChildTheme
but rather, outside of it.
Ben
[Content Hidden]
[Content Hidden]
Thanks Ben for clarifying my mistake!