- This topic has 10 replies, 4 voices, and was last updated 9 months, 2 weeks ago by David.
July 13, 2022 at 7:02 am #2281512Jonas
Hi! I´m am trying to learn WordPress, Generatepress and Generateblocks and understand how to use it all together. Are the most people replacing WordPress blogpage and category-archives with the new query loops? Or is it more ment to be used as for example to show the last 4 blogposts on the Homepage? Is there any right or wrong in that? Because I can see the point of being able to customize the blogpage more. But for example, the category query loop term links to the WordPress category archive page of that category with made me confused. Or is there a way to link that to a static category page built with Query loops?
Kind regards/JonasJuly 13, 2022 at 7:40 am #2281552DavidStaffCustomer Support
in an upcoming update to GP Premium we will be adding a feature to the Block Elements module that will allow you to remove the Themes Loop from any template. And in its place you can build out the block element using the Query Loop Block ( or any other blocks ). In the instances where the query is defined by the template eg. a Category Archive, you can use
Inherit query from templatetoggle in the GB Query Loop block. And GP and GB will do the rest. So you could build one element that displays a custom query loop on all category archives for example.
It is possible to do this today, but requires some custom development.
There are also some other alternative methods that hijack the template hierarchy to show a static page in place of the category template. Theres a doc on that here
Personally if you feel the need to rebuild the entire loop then wait for the next GP Premium update.
Or if you just want design your post content templates for your archives then use a Block Element – Content Template:July 13, 2022 at 7:51 am #2281753Jonas
Thank you for the answer David!
/JonasJuly 13, 2022 at 8:29 am #2281790DavidStaffCustomer Support
You’re welcomeSeptember 13, 2022 at 4:06 am #2341448Adrien
Do you have any news on this feature to the Block Elements module that will allow to remove the Themes Loop from any template.
I’d also like to replace blog page and archives with Queryloops.
ThanksSeptember 14, 2022 at 3:28 am #2342512DavidStaffCustomer Support
its currently planned for GP 3.1.4 and GPP 2.2 – which are the next updates for the theme and premium.
We haven’t set a date for the release yet, but i would expect we will begin alpha testing in the next 30 days.September 14, 2022 at 1:31 pm #2343122Adrien
Thank you David and all the team. I saw Alpha announcement on the FB group 😉December 13, 2022 at 6:18 am #2460387Quentin
I used you snippet PHP code to replace the category archive by a single page : https://staging-darwinnutritionfr-dev.kinsta.cloud/super-aliments.
It works, but now the problem is that all posts in this category (super-aliments), such as https://staging-darwinnutritionfr-dev.kinsta.cloud/super-aliments/acai/ are driving to the category page.
Would you know why ?
When I deactivate the snippet, the URL for the posts are working and driving to the posts.
Thank you for you help
QuentinDecember 13, 2022 at 6:43 am #2460405DavidStaffCustomer Support
if you’re using Query Loops then don’t use the Static Page method.
Instead create a Block Element – Loop Template:
Add you GB Query Loop block, and in it Settings enabled:
Inherit Query from Template
Set the Display Rules to:
All Archivesand the
Blogif you want it every where. Or just the specific Post Category Archives you need it forDecember 13, 2022 at 7:31 am #2460465Quentin
Thank you David!December 13, 2022 at 8:10 am #2460621DavidStaffCustomer Support
- You must be logged in to reply to this topic.