Archived topic
Customize Breadcrumb NavXT
1 reply · Started by generatepressiscool on January 2, 2023
I've used this snippet and the breadcrumbs show.
add_action( 'generate_before_content', function() {
if ( function_exists( 'bcn_display' ) && ! is_front_page() ) {
bcn_display();
}
} );
Goal:
1) Breadcrumbs don't show for posts and particular pages (would this be easier with a hook? Wasn't able to make it work that way).
2) The parent page should show in the breadcrumbs. Home >> parent >> page
3) The title of the page and trailing arrow shouldn't show. Home >> parent
The end-result would be home >> parent only showing on pages that I've picked (not front page, not posts, only particular pages).
WHow to do this?
3)
Hello there,
You can re-try using a Hook Element. It may be better because you can test out different hooks.
Example code:
<?php
if ( function_exists( 'bcn_display' ) && ! is_front_page() ) {
bcn_display();
}
?>
Make sure Enable PHP is toggled on in the Hook Element settings.
If it doesn't show, the issue could be with the Breadcrumbs plugin instead.
2 & 3 are out of our scope of support. It would be best to reach out to your Breadcrumbs plugin for this. If it's not possible with that plugin, you can try a different plugin. It would be good to ask on our Facebook Page for alternative Breadcrumbs plugins that can help you achieve 2 & 3: https://www.facebook.com/groups/1113359788719597
