# Code examples

The two most common ways to filter the news feed is with buttons or by a dropdown select. Here are two simple examples using our query parameters:

```
// Buttons
<button class="et_pb_button" onclick="window.location.href='/'" style="font-size: 18px; border: none; color: #FFFFFF; background-color: #fba41b; border-radius: 8px; cursor: pointer; padding-bottom: 6px; padding-top: 6px;">All</button>
<button class="et_pb_button" onclick="window.location.href='?m-tags=regulatory'" style="font-size: 18px; border: none; color: #FFFFFF; background-color: #fba41b; border-radius: 8px; cursor: pointer; padding-bottom: 6px; padding-top: 6px;">Regulatory</button>
<button class="et_pb_button" onclick="window.location.href='?m-tags=-regulatory'" style="font-size: 18px; border: none; color: #FFFFFF; background-color: #fba41b; border-radius: 8px; cursor: pointer; padding-bottom: 6px; padding-top: 6px;">Non-Regulatory</button>
```

```
// Dropdown
<script>
function openUrl(event) {
    window.location.href = event.target.value;
}
</script>

<form style="display: inline-flex; flex-direction: column;" onchange="openUrl(event)">
<label for="category" style="font-size: 18px">Choose category</label>
<select name="kategori" id="kategori" style="margin: 15px 0 0 0; width: 250px; background-color: #f5f8fa; border-radius: 4px; height: 40px;" class="hs-input is-placeholder">
  <option value="/">All</option>
  <option value="?m-tags=regulatory">Regulatory</option>
  <option value="?m-tags=-regulatory">Non-Regulatory</option>
</select>
```


---

# Agent Instructions: 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:

```
GET https://modfin.gitbook.io/mfn-wp-plugin/code-examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
