< Toggle Sidebar > Toggle Sidebar

Breadcrumbs with Custom Post Types and Categories

This snippet is very similar to the Learn Dash Code and once you understand how it works can be used in the same wpseo_breadcrumb_filter.

I would suggest reading that topic before heading over to this one.

Once you have read that please review the gist code snippet.

In this function the IF statement to determine if we need to edit a call is uses a is_tax function in WordPress.

This is looking for a taxonomy that is available and to then edit the breadcrumb path.

This is very useful for custom post types

Without this snippet you will only get a category name and not the top classification.

With a simple edit, you can add any Taxonomy as a new IF statement and replace the breadcrumb path again.

Breadcrumb Header for Divi Builder

Breadcrumb Module

Adds a new clean header with breadcrumbs powered by the Yoast SEO plugin. 
Learn More