Archived topic
Block Element as a Shortcode?
3 replies · Started by Kyle Van Deusen on December 9, 2021
I'm curious to know if it's possible to create a Block Element, then insert it via a shortcode (or something similar)?
I'm really struggling still with creating post loops where I need them. This seemed like it could be some kind of workaround — but I'm not sure!
Hi Kyle,
couple of hackish work arounds.
1. For a block element without the loop:
2. An how to make your own custom loop with its own hook for a block element content template:
https://generatepress.com/forums/topic/cpt-query-block-within-a-page-section/#post-1964135
Thanks, David! I'll give these a play and see what I can do!
You're welcome