# Filter blog posts or portfolio items

You can filter blog posts in the Divi blog module easily with the Divi Filter.

## Buttons

**Step 1:**

Click on the grey gear icon to access the Button Settings (on the button, that you want to filter with). You can also use images, or any other element to trigger the filtering. It doesn’t have to be a button module.

![](https://tawk.link/603b46ec1c1c2a130d6338d9/kb/attachments/gfAFvPDAu9.png)

**Step 2:**

Go to Advanced → CSS ID & Classes → CSS Class. Here you add the **df-button** class.

**Step 3:**

Additionally add any category that you want to filter with that button like that: **dfc-\[blog-post-category]**

The category is the category of the blog post.&#x20;

For example:

The category "Lifestyle" would be **dfc-lifestyle**. Everything in lower cases.

![Screenshot from WordPress Dashboard in Posts](https://2665944738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSEWkls0MvMs9Ywmmk3W%2Fuploads%2Fn35tTLf6nsjf73YZBkug%2Fimage.png?alt=media\&token=28675873-9046-4805-8da3-40f484b56e37)

{% hint style="info" %}
Buttons have to be in a separate section, than your filterable elements. Or you add the **df-buttons** class to your button row (Premium features).
{% endhint %}

## Section

**Step 1:**

Click on blue gear icon to access the Section Settings.

![](https://tawk.link/603b46ec1c1c2a130d6338d9/kb/attachments/bySj6sR2Ub.png)

**Step 2:**

Go to Advanced → CSS ID & Classes → CSS Class. Here you add the **df-area df-post** class.

## Portfolio items (Premium)

If you want to filter portfolio items, you just have to change the blog module from posts to portfolio items. Filtering portfolio items requires a Premium license.

{% hint style="info" %}
You can get Divi Filter Premium by clicking [here](https://shop.danielvoelk.de/#divi-filter).
{% endhint %}

## Pagination

Unfortunately, pagination is not yet supported, so please set the Post Count to the max. You can also set it to 999.

## Video tutorial

{% embed url="<https://www.youtube.com/watch?v=y9ezRaBLBMU>" %}

## Demo

Here you can find a demo: <https://demos.danielvoelk.de/blog/>
