Archived topic
Query loop used in Elements?
5 replies · Started by Annamari on September 28, 2022
Hi,
is it possible to add the query loop to an element as a hook to be displayed at the end of every blog post?
Thanks,
Annamari
Hi there,
A believe a block element hook is what you are looking for:
https://docs.generatepress.com/article/block-element-hook/
Let me know if this helps :)
Hi Leo,
great, that's the one!
Is it possible to build a related posts section with this? I managed to embed the block at the end of the posts, but I got stuck with setting it up to pull posts from the same category and skip the actual post.
Thanks,
Annamari
The related posts feature would require the Pro version of GenerateBlocks:
https://generateblocks.com/creating-related-posts-with-query-loop-block/
Thanks!
No problem :)