Problems with Breadcrumb on custom-post-type

Hi Bob

The second if-statement is necessary for the archive-{slug}.php. This ends the breadcrumbs output. Otherwise the breadcrumb also shows the first entry of the displayed posts.

And no, this if-statement does not return an error message because that is the short form of an if-statement (one liner), and it doesn’t need an endif.

Horst

PS: and here how it looks now (compare it to my first screenshots) :slight_smile:

Just for information: The CPT is called “news”, but it’s german name is “Aktuelles”. That’s why the difference in URL and breadcrumb. If my boss doesn’t accept this I have to rename the CPT. But the main thing is that the breadcrumb now shows the same behavior on all CPT’s, posts and pages :wink:

The archive-news.php:

Auswahl_366

and here the single-news.php:
Auswahl_367