generated from pascalmartineau/wp-skeleton
fix: front page breadcrumb
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user