Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Design A Compact List Of Divi Blog Posts

Nelson Miller Profile Orange
In this tutorial I will show you how to design a compact list of Divi blog posts using the Divi Blog module and some CSS styling.

▶️ Please watch the video above to get all the exciting details! 👆

1. Set Up And Design The Blog Module

The first step is to set up the blog module design settings. After this, we will add some required CSS, but first, let’s get the settings adjusted. I’ll list each step here.

Content Tab

In the Content toggle, adjust the post count to your preference. I am choosing 5 for this tutorial.

In the Elements toggle, disable everything:

  1. Add the Divi Blog module to your layout
  2. Disable “Show Featured Image”
  3. Disable “Show Author”
  4. Disable “Show Date”
  5. Disable “Show Categories”
  6. Disable “Show Excerpt”
  7. Disable “Show Pagination”

Design Tab

In the Title Text toggle, adjust the following:

  1. Set the “Font Weight” to Bold
  2. Change the H2 “Title Text Size” to 20px Desktop, 18px Tablet, and 16px Phone
  3. Set the “Title Text Color” to #0070fc on hover

For all of these values, you can change them to fit your branding and preferences. I am simply providing the values used in the video tutorial for you to follow. 

2. Add A Custom CSS Class To The Divi Blog Module

The next part of the tutorial is adding the CSS to complete the styling. But first, we need to add a custom CSS class to the Divi Blog module. This will connect the code snippets to the specific Blog module that you are designing, and make sure it does not affect other Blog modules on the site.

Open the Divi Blog module settings and go to the Advanced tab and open the CSS ID & Classes toggle. From there, copy and paste or write “pa-blog-compact-list” into the CSS Class input field, as shown in the screenshot.

add a CSS class to the compact Divi blog list

3. Add The CSS Snippet In Divi

The last step is to copy and paste the CSS code snippets below into your Divi website.

Where To Paste The CSS Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the CSS tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the style.css file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>Custom CSS code box.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.

/*add the border and spacing around the entire blog list*/
.pa-blog-compact-list.et_pb_posts {
	border: 2px solid #f0f3f6;
	border-radius: 10px;
	padding: 30px 30px 20px;
}

/*adjust the spacing and add the border after each blog post*/
.pa-blog-compact-list .et_pb_post:not(:last-child) {
	margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f3f6;
}

.pa-blog-compact-list .et_pb_post:last-child {
	margin-bottom: 0px;
}


/*make the title link spread over the entire post to make it clickable*/

.pa-blog-compact-list .entry-title a:before {
	position: absolute;
	display: block;
	content: "";
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	z-index: 1;
}


/*add the arrow icon on each blog post*/
.pa-blog-compact-list .entry-title a:after {
	content: "\35";
	font-family: ETModules;
	font-weight: 800;
	font-size: 1em;
	line-height: 1em;
	color: #777b88;
	background-color: #f0f3f6;
	position: absolute;
	top: 2px;
	right: 0px;
	padding: 2px;
	border-radius: 50%;
	width: 1em;
	text-align: center;
}

/*change the icon color on hover*/
.pa-blog-compact-list .entry-title a:hover:after {
	color: #0070fc;
	transition: all ease .3s;
}

Code Explanation

The code used here is pretty simple, and I have added notes as comments within the code for each snippet. 

The first part of the code is adding the border and spacing around the entire blog list. 

The second part is adjusting the space and adding the border below each individual post.

The third part of the code is making the entire width of the blog post clickable as the link. Otherwise, only the part where the title text is would be clickable.

The fourth part is adding the icon to each blog post link. The styling can be adjusted to your preference, like the color, background color, or other values. You can also adjust the hover color as needed.

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Trail Committee Membership badge with map design

Join The Trail Committee!

Show support for our ongoing work creating community resources at Pee-Aye Creative and enjoy exclusive member perks in return.

Learn More

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

8 Comments

Comments By Members

These comments are highlighted because they were posted by fans who have a membership on this site.

  1. Bill Cameron <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

    This is very helpful. I’m working on something that is very similar, but can’t figure out how to do one thing.

    I’m trying to display a single blog entry in a featured area above the main nav. I’ve used your code with some style differences, which include changing the icon to a “Read Blog” button. I’ve also set the title text to be centered.

    However, I’d like the Read Blog button to appear 20px to the right of the title, no matter how wide the title may be. If you like, you can see the dev version of what I’ve managed so far here:

    https://dev-max-retail.pantheonsite.io/

    Is there was way for the button position to adjust based on the length of the latest post title?

    Thank you for any insight you can share!

    Reply
    • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

      Hi Bill!

      I have checked the page and not able to see compact Blog list. Did you remove it? If yes, can you add it again?

      Reply
      • Bill Cameron <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Thank you, Hemant. I’m out of my office the rest of week, so I will jump in on Monday. I appreciate the help~

      • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Hi Bill!

        Please use the following code:

        .pa-blog-compact-list .et_pb_post .entry-title a{
        margin-right: 50px;
        }

        .pa-blog-compact-list .et_pb_post{
        text-align: center;
        width: fit-content;
        }

        .pa-blog-compact-list{
        text-align: center;
        display: flex;
        justify-content: center;
        }

        You can adjust the code for mobile device.

        Let me know how it goes!

      • Bill Cameron <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Following up, I have implemented this on a test site here:

        https://test.bill-cameron.com

        This is a different client, but I looking for the same thing, if possible. One thing I noted was when I tested with a longer post title, the title text extended below the Read The Blog button element.

        If what I’m looking forward isn’t possible, no worries. Heaven knows I’ve been tinkering off and on for days without zeroing on what I’d like it to do! 🙂

      • Bill Cameron <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        My apologies. I’m not the only person working on the site and one of the other folks committed changes that overwrote my test. I will set it up on a different site that only I have access to so there’s no danger that will happen again. As soon as I get it sorted, I’ll repost.

        Thanks for checking, and sorry about the mix-up.

Comments By Others

  1. Jan Knudsen

    Hi Nelson
    and thankyou for this fine CSS snippet for “Compact List Of Divi Blog Posts”. I find it very usefull.

    Everything looks fine, except the oldest post in the bottom of the list.
    This post seems to be missing the padding, in my case 7px.

    I am a novice to CSS, so I can not figure out what is wrong.

    I use this code placed in the Additional CSS section:

    /*adjust the spacing and add the border after each blog post*/
    .pa-blog-compact-list .et_pb_post:not(:last-child) {
    margin-bottom: 10px;
    padding-bottom: 0px;
    padding-top: 7px;
    padding-left: 7px;
    padding-right: 7px;
    }

    .pa-blog-compact-list .et_pb_post:last-child {
    margin-bottom: 0px;
    }

    /*make the title link spread over the entire post to make it clickable*/

    .pa-blog-compact-list .entry-title a:before {
    position: absolute;
    display: block;
    content: “”;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    }

    Reply
    • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

      Hi Jan!

      The padding seems to be working fine at my end. It seems some other code is causing the issue. Can you share the URL of the page to investigate further?

      Reply

Submit a Comment

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

Recent Posts

0

Your Cart