> For the complete documentation index, see [llms.txt](https://docs.danielvoelk.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.danielvoelk.de/functional/filter-blog-posts-or-portfolio-items.md).

# 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](/files/qa8wHmH8G2NwZAKNr7Bf)

{% 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/>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.danielvoelk.de/functional/filter-blog-posts-or-portfolio-items.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
