# Allow Custom JS in Block

**URL:** https://forum.pinegrow.com/t/allow-custom-js-in-block/8452
**Category:** Feature Request
**Tags:** feature-request, wordpress
**Created:** [October 20, 2023, 8:25pm UTC](https://forum.pinegrow.com/t/allow-custom-js-in-block/8452 "2023-10-20T20:25:58Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jonroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jonroc/32/2805_2.png) [@jonroc](https://forum.pinegrow.com/u/jonroc)
#### Post date: [October 23, 2023, 5:25pm UTC](https://forum.pinegrow.com/t/allow-custom-js-in-block/8452/3 "2023-10-23T17:25:20Z")

</div>

Ok, I see the issue here. The Block Conditions are not advanced enough for what I need.

One thing I’ve been doing is creating 99% of the block in PG and then moving the code that is generated for WP into a PG blocks folder. This exports the block code to the theme, but since I no longer need the initial setup for the block, I disable that block in PG, and the only thing I have to do is adjust the block’s code in a text editor to what I need and manually enqueue the block. The problem I have is that the inc/custom.php is called before the blocks, so I don’t have access to the PG helper files that are needed to run the block properly.

Is there no way to put the [inc/custom.php at the bottom of function.php](https://forum.pinegrow.com/t/move-require-once-inc-custom-php-to-bottom-of-functions-php/8250/1) so I can have these custom blocks work quickly and easily? In the meantime, I can add the enqueued files manually at the bottom of functions.php, but that’s dangerous because we have no control over functions.php, and it’s easy for a team member to accidentally overwrite this.

-Thanks!

---

_[View the full topic](https://forum.pinegrow.com/t/allow-custom-js-in-block/8452)._
