-
I have a WordPress website that is using RankMath and Advanced Custom Fields Pro (ACF Pro). My RankMath breadcrumbs does not display the format properly at the moment, and I want to fix that.
I have this ACF taxonomy, Genre (It does not have a physical archive page). I have then created a Genre called Biografier (https://bookpare.dk/g/biografier/).
The Rankmath breadcrumb correctly displays the structure on the custom post type page (https://bookpare.dk/lydbog/spionchefen-erindringer-fra-celle-18/):
Hjem – Lydbøger – Biografier – Spionchefen – Erindringer fra celle 18However, the breadcrumb does not correctly show the relationship on the genre page (https://bookpare.dk/g/biografier/): Hjem – Genre – Biografier
It is missing the Lydbøger page. How can i create this link, so that the genre page https://bookpare.dk/g/biografier/ correctly shows the breadcrumb as here: Hjem – Lydbøger – Biografier
I have tried to use this PHP code (shown below) in my functions.php, but the breadcrumb still doesn’t show what i want on this taxonomy page: https://bookpare.dk/g/biografier/
Can you please help me fix this. I want the breadcrumbs on that page to be Hjem – Lydbøger – Genrer – Biografier
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs ) { if ( is_tax( 'genre' ) ) { array_splice($crumbs, 1, 0, array(array( 'url' => get_post_type_archive_link('lydboeger'), 'label' => 'Lydbøger' ))); } return $crumbs; }, 10, 1);
The ticket ‘RankMath Breadcrumb for ACF taxonomy page’ is closed to new replies.