Comments Chala88 started the conversationSeptember 8, 2022 at 7:30pmHi,The breadcrumbs are showing "course layout" instead of course category navigation.Example: Unreal Engine 5 para Arquitectura y Archviz - PlanetaCGThe breadcrumbs shows "PlanetaCG » Course Layouts » Curso PlanetaCG"The breadcrumbs must show "PlanetaCG >> Cursos >> Course title"Thank you.[deleted] repliedSeptember 10, 2022 at 6:20amWhich plugin did you use to show breadcrumbs there . Yes actually the course layouts is loaded there for the course with course information . IF the plugin has filter we can modify it to show correct link of breadcrumbs.1 Like 6Alberto repliedSeptember 10, 2022 at 7:07amHi Alex,Thank you for the answer.I'm using rank math 6Alberto repliedSeptember 10, 2022 at 7:09amHi Alex,Thank you for the answer.I'm using rank math. Have you workede with It?Could you explain how to do It?Thanks 6Alberto repliedSeptember 12, 2022 at 5:50amsolved by RankMath support.If It helps, They added the following code:add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { if( is_singular('course') ) { $crumbs[1][0] = 'Cursos'; $crumbs[1][1] = 'https://planetacg.com/todos-los-cursos/'; $crumbs[2][0] = get_the_title(get_queried_object_id()); } return $crumbs;}, 10, 2);[deleted] repliedSeptember 13, 2022 at 12:07pmHi thanks for sharing the code snippet here . Sign in to reply ...
Hi,
The breadcrumbs are showing "course layout" instead of course category navigation.
Example: Unreal Engine 5 para Arquitectura y Archviz - PlanetaCG
The breadcrumbs shows "PlanetaCG » Course Layouts » Curso PlanetaCG"
The breadcrumbs must show "PlanetaCG >> Cursos >> Course title"
Thank you.
Which plugin did you use to show breadcrumbs there . Yes actually the course layouts is loaded there for the course with course information .
IF the plugin has filter we can modify it to show correct link of breadcrumbs.
Hi Alex,
Thank you for the answer.
I'm using rank math
Hi Alex,
Thank you for the answer.
I'm using rank math. Have you workede with It?
Could you explain how to do It?
Thanks
solved by RankMath support.
If It helps, They added the following code:
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
if( is_singular('course') ) {
$crumbs[1][0] = 'Cursos';
$crumbs[1][1] = 'https://planetacg.com/todos-los-cursos/';
$crumbs[2][0] = get_the_title(get_queried_object_id());
}
return $crumbs;
}, 10, 2);
Hi thanks for sharing the code snippet here .