Divi Breadcrumbs Module – Showing First and Last Links Only

This post may contain referral links which may earn a commission for this site

My Divi Breadcrumbs Module allows you to add breadcrumb links into your Divi Builder layouts. These links are automatically generated. For example, for a post the breadcrumb links will look something like: "Home > Category > Subcategory > Post Title". If you'd prefer to just show the first and last links (i.e. "Home > Post Title"), you can do so with the following CSS:

.et_pb_dmb_breadcrumbs li:not(:first-child):not(:last-child) { 
	display: none; 
}

You can add this to your entire site by pasting it into the "Divi > Theme Options > General > Custom CSS" box. Alternatively, if you'd like to just apply it to a single post / page, you can paste it into the per-page Custom CSS box, which you'll find within the three-lined "hamburger" menu in the top right of the purple Divi Builder box on your post / page edit screen.

The code above will force the display of just the first and last link on all pages / posts / custom post types.

Showing Just the First and Last Links on Posts Only

If you only want to make this change on posts (not pages / custom post types), you can use this variant instead:

body.single-post li:not(:first-child):not(:last-child) { 
	display: none; 
}

Hundreds of new features for Divi
in one easy-to-use plugin

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *