# Condition not working with function as expected

**URL:** <https://forum.bricksbuilder.io/t/condition-not-working-with-function-as-expected/24758>\
**Category:** How To\
**Created:** [July 23, 2024, 10:46am UTC](https://forum.bricksbuilder.io/t/condition-not-working-with-function-as-expected/24758 "2024-07-23T10:46:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![aslotta](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/aslotta/32/5419_2.png) [@aslotta](https://forum.bricksbuilder.io/u/aslotta)\
**Post date:** [July 23, 2024, 12:19pm UTC](https://forum.bricksbuilder.io/t/condition-not-working-with-function-as-expected/24758/4 "2024-07-23T12:19:06Z")

</div>

Hey Duncan,

did you allow your function to be used with the dynamic data echo tag?

> **[Filter: bricks/code/echo\_function\_names](https://academy.bricksbuilder.io/article/filter-bricks-code-echo_function_names/)**
>
> Starting at Bricks 1.9.7, you must explicitly allow any function names you want to call via Bricks’ dynamic data echo tag using the new bricks/code/echo\_function\_names filter. You can add this to your Bricks child theme or the code snippet plugin of...

```auto
add_filter( 'bricks/code/echo_function_names', function() {
  return [
    'sidebar_display',
  ];
} );

```

Best,

André

---

_[View the full topic](https://forum.bricksbuilder.io/t/condition-not-working-with-function-as-expected/24758)._
