# Creating a library of blocks in a single plugin

**URL:** <https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533>\
**Category:** Pinegrow WordPress Plugin\
**Created:** [December 27, 2022, 11:52am UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533 "2022-12-27T11:52:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stphnwlkr](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/stphnwlkr/32/4845_2.png) [@stphnwlkr](https://forum.pinegrow.com/u/stphnwlkr)\
**Post date:** [December 27, 2022, 11:52am UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/1 "2022-12-27T11:52:01Z")

</div>

I am curious if there is a guide to creating a series of blocks within a single plugin.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 1:13pm UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/2 "2022-12-27T13:13:22Z")

</div>

There isn’t a guide, but you can create as many blocks as you want just by adding the Block action to other elements in your project.

---

<div class="post-metadata">

**Author:** ![stphnwlkr](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/stphnwlkr/32/4845_2.png) [@stphnwlkr](https://forum.pinegrow.com/u/stphnwlkr)\
**Post date:** [December 27, 2022, 2:00pm UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/3 "2022-12-27T14:00:48Z")

</div>

Adam, thank you. This is where my confusion starts. Are these all loaded on one page, or can you create multiple files - one for each block? If the latter, I haven’t figured out how to do that.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 2:19pm UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/4 "2022-12-27T14:19:33Z")

</div>

Got it. You can create multiple files in your project and add blocks to each. They will all be exported to a single plugin.

One pinegrow project == one plugin with as many blocks as you can make.

As a practice, it’s worth organizing your blocks into one or more pages that make sense in context. One page per block could get unwieldy, but creating a system like the one below, for example, might help:

- blocks-global.html → Blocks that you may use everywhere on your Wordpress site
- blocks-home.html → Homepage-only blocks
- blocks-loop.html → holds loops and various cards that you might want to use in them.
- etc…

---

<div class="post-metadata">

**Author:** ![stphnwlkr](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/stphnwlkr/32/4845_2.png) [@stphnwlkr](https://forum.pinegrow.com/u/stphnwlkr)\
**Post date:** [December 27, 2022, 2:54pm UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/5 "2022-12-27T14:54:07Z")

</div>

Again, thank you! I really appreciate the speed of the response and the assistance.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 2:57pm UTC](https://forum.pinegrow.com/t/creating-a-library-of-blocks-in-a-single-plugin/7533/6 "2022-12-27T14:57:08Z")

</div>

I’m just a dude trying to avoid real work…
