I have a site with the following structure on the Top Menu:
About | Library | Author | etc
Under the Library item I have a bunch of Volumes, each with a bunch of Books (a total of about 40 books).
The menu stops at the Book level. I don't have each Chapter because there's so many of them (hundreds).
In the case of Chapter (CPT) pages the plugin doesn't add a breadcrumb because the Chapter is not in the Menu.
Is there a way that I can get the same breadcrumb array from a Book page, but on a Chapter page? So I can add custom code to fill out the additional item for the array with the Chapter name/url.
Note: when trying to play with the custom functions [1], I get an error "Uncaught Error: Class "Kadence\Menu_Breadcrumb" not found in /.../themes/kadence-child/header.php:57".
[1]
$menu_breadcrumb = new Menu_Breadcrumb( 'primary' ); // 'main' is the Menu Location
$current_menu_item_object = $menu_breadcrumb->get_current_menu_item_object();
I have a site with the following structure on the Top Menu:
In the case of Chapter (CPT) pages the plugin doesn't add a breadcrumb because the Chapter is not in the Menu.
Is there a way that I can get the same breadcrumb array from a Book page, but on a Chapter page? So I can add custom code to fill out the additional item for the array with the Chapter name/url.
Note: when trying to play with the custom functions [1], I get an error "Uncaught Error: Class "Kadence\Menu_Breadcrumb" not found in /.../themes/kadence-child/header.php:57".
[1]
Thanks!