[Resolved] Replace blog page and archives with Queryloops?

Home Forums Support [Resolved] Replace blog page and archives with Queryloops?

Home Forums Support Replace blog page and archives with Queryloops?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2281512
    Jonas

    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/Jonas

    #2281552
    David
    Staff
    Customer Support

    Hi there,

    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 template toggle 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:

    https://docs.generatepress.com/article/block-element-content-template/

    #2281753
    Jonas

    Thank you for the answer David!
    /Jonas

    #2281790
    David
    Staff
    Customer Support

    You’re welcome

    #2341448
    Adrien

    Dear David,
    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.
    Thanks

    #2342512
    David
    Staff
    Customer Support

    Hi there,

    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.

    #2343122
    Adrien

    Thank you David and all the team. I saw Alpha announcement on the FB group 😉

    #2460387
    Quentin

    Hi team
    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
    Quentin

    #2460405
    David
    Staff
    Customer Support

    Hi there,

    if you’re using Query Loops then don’t use the Static Page method.
    Instead create a Block Element – Loop Template:

    https://docs.generatepress.com/article/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 Archives and the Blog if you want it every where. Or just the specific Post Category Archives you need it for

    #2460465
    Quentin

    Thank you David!

    #2460621
    David
    Staff
    Customer Support

    You’re welcome

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.