fix: front page breadcrumb

This commit is contained in:
2025-09-16 14:55:54 -04:00
parent e3b0433626
commit 8f06c093a8

View File

@@ -78,7 +78,7 @@ function ccat_get_breadcrumbs( $node ) {
// Helper: Get breadcrumbs for a given post // Helper: Get breadcrumbs for a given post
function ccat_get_post_breadcrumbs( WP_Post $post ) { function ccat_get_post_breadcrumbs( WP_Post $post ) {
$breadcrumbs = array(); $breadcrumbs = array();
$is_front_page = get_option( 'show_on_front' ) === 'page' && get_option( 'page_on_front' ) === $post->ID; $is_front_page = get_option( 'show_on_front' ) === 'page' && (int) get_option( 'page_on_front' ) === $post->ID;
if ( $is_front_page ) { if ( $is_front_page ) {
return $breadcrumbs; // No breadcrumbs for the front page return $breadcrumbs; // No breadcrumbs for the front page
} else { } else {