Skip to main content
1 of 3
tfrommen
  • 9.2k
  • 7
  • 39
  • 59

Suppose you have set up an array of page IDs where you don't want the breadcrumbs to be displayed.

$ids = array( 4, 8, 15, 16, 23, 42 );

Now you just have to check if the currently displayed page (or post) has one of these IDs, and if not, display the breadcrumbs.

if ( ! in_array( get_the_ID(), $ids ) ) {
    bcn_display();
}

// EDIT
And if you want to exclude pages only (no other templates), you could speed up the check a bit.

if (
    ! is_page()
    || ! in_array( get_the_ID(), $ids )
) {
    bcn_display();
}
tfrommen
  • 9.2k
  • 7
  • 39
  • 59