# Is Adding Attributes to the 'Register Post Types' WP Action Possible in PG?

**URL:** https://forum.pinegrow.com/t/is-adding-attributes-to-the-register-post-types-wp-action-possible-in-pg/8377
**Category:** Pinegrow WP
**Tags:** wordpress
**Created:** [September 20, 2023, 7:37pm UTC](https://forum.pinegrow.com/t/is-adding-attributes-to-the-register-post-types-wp-action-possible-in-pg/8377 "2023-09-20T19:37:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iamrobbie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/iamrobbie/32/4694_2.png) [@iamrobbie](https://forum.pinegrow.com/u/iamrobbie)
#### Post date: [September 20, 2023, 7:37pm UTC](https://forum.pinegrow.com/t/is-adding-attributes-to-the-register-post-types-wp-action-possible-in-pg/8377/1 "2023-09-20T19:37:32Z")

</div>

🌲 Hello PG Community Members! 🌲

Per the [WordPress documentation](https://developer.wordpress.org/reference/functions/register_post_type/) on the `register_post_type()` function, there are several attributes that can be used with the function.

I’m specifically interested in using the `template` and `template_lock` parameters, whereby I can dictate exactly which custom WP Blocks are used for specific post type(s).

Can I add these parameters to the `register_post_type()` function within Pinegrow? If so, how?

If not, how would some of the WP pros here recommend achieving this? Do I need to wait until I’m finished using PG, then add the custom PHP in production?

* * *

NOTE: I am exporting as a PLUGIN, not as a theme within Pinegrow.

---

<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: [September 22, 2023, 8:12am UTC](https://forum.pinegrow.com/t/is-adding-attributes-to-the-register-post-types-wp-action-possible-in-pg/8377/2 "2023-09-22T08:12:50Z")

</div>

Hi @iamrobbie, at the moment it is not possible to add extra fields.

The easiest and most flexible workaround is to generate `register_post_type` code with [https://generatewp.com/post-type/](https://generatewp.com/post-type/) and then add that code into `inc/custom.php` instead of using the Register Post Type action.

---

<div class="post-metadata">

### Author: ![iamrobbie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/iamrobbie/32/4694_2.png) [@iamrobbie](https://forum.pinegrow.com/u/iamrobbie)
#### Post date: [September 22, 2023, 5:14pm UTC](https://forum.pinegrow.com/t/is-adding-attributes-to-the-register-post-types-wp-action-possible-in-pg/8377/3 "2023-09-22T17:14:21Z")

</div>

Thanks for the tip, @matjaz!
