# How to insert this php code via Function or PHP code actions

**URL:** <https://forum.pinegrow.com/t/how-to-insert-this-php-code-via-function-or-php-code-actions/6730>\
**Category:** Questions\
**Tags:** code\
**Created:** [July 30, 2022, 12:26am UTC](https://forum.pinegrow.com/t/how-to-insert-this-php-code-via-function-or-php-code-actions/6730 "2022-07-30T00:26:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [July 31, 2022, 6:34am UTC](https://forum.pinegrow.com/t/how-to-insert-this-php-code-via-function-or-php-code-actions/6730/5 "2022-07-31T06:34:59Z")

</div>

@fogseller to do that without having to manually edit after export:

#1 Use The Loop action (not Show Posts) and select “Args in own PHP block”.

 ![q1](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/82c51aa285723b795f83a5b391ac4f921d3b87f7.jpeg)

This adds a PHP block where the query args are defined. PG changes this code whenever you change the The Loop action settings.

 ![q2](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/b/b19b2cf65684aa1d33963d29f1c980b806b1b33d.jpeg)

#2 To customize parameters, add your own PHP block AFTER the PHP block with query args and modify the args there.

 ![q3](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/c/cfa9c997dc510e82c5a3abb14076ed1548227aea.jpeg)

Enjoy the rain! 🙂

---

_[View the full topic](https://forum.pinegrow.com/t/how-to-insert-this-php-code-via-function-or-php-code-actions/6730)._
