Site logo

[Resolved] Query Loop Block

Home Forums Support [Resolved] Query Loop Block

Home Forums Support Query Loop Block

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2273217
    Brad

    Hello,

    I’m experimending with the query loop generator block and have a question about the feature image.

    Client’s often do not upload the right sized dimension for the blog post feature image resulting in a grid that’s more of a masonry style instead of a clean fixed grid. In Content Views there is an option to soft crop the images for a unfiform display of images. Is there a way to set this up with this block uisng a background image in a container or use CSS to have a standard height?

    My Dev site in question is: https://wordpress-624836-2604688.cloudwaysapps.com/ ( latest Articles)

    THanks!

    #2273218
    Fernando
    Customer Support

    Hi Brad,

    Yes, you could set up a Container Block with a dynamic Background Image. To set the height, you’ll need to set a minimum height for the Container Block in its Block Settings. Example: https://share.getcloudapp.com/OAu86O5r

    You may also set the height for specific views through the responsive buttons at the top of the Block Settings.

    Then, for the Image Block, you may also set a specific Height, and set the image object-fit to cover to achieve similar heights for images in your Query Loop Block. Example: https://share.getcloudapp.com/NQulNbQ0

    Either should work.

    Hope this helps!

    #2274140
    Brad

    Thank you – that was easy. Getting used to Generator Blocks still and dynamic content.

    #2274268
    Fernando
    Customer Support

    You’re welcome Brad!

    #2293301
    Brad

    Hi again – just reopenign this as i’m expereinceing a weird behavior with my query loop. I have to set the ‘Post per page” setting one less than than the number I require which seems odd.

    Posts per page: 2 .. rendered paged https://wordpress-624836-2604688.cloudwaysapps.com/ (LATEST NEWS) section.

    Just a heads up.. still works but odd.

    Thanks,
    Brad

    #2293350
    Ying
    Staff
    Customer Support

    Hi Brad,

    Do you mean you’ve set theposts per page to 2 in this case to show 3 posts?

    That’s very odd… Have you added any custom functions to your site?

    If so, can you disable the custom functions to test?

    #2293461
    Brad

    Yes – this is what is happening, 2 creates 3 posts. lol. I disabled Code snippets which had some custom functions and same result. The template is from the Site Library. Donate by Mike Oliver. Thinking back this may have been the behavior when I first imported it but I didn’t clue in until I started working on the home page. It’s not a big deal, just weird.

    Thanks

    #2294320
    Ying
    Staff
    Customer Support

    The Donate template is not using Query loop block, it’s using WP Shos posts with a shortcode on the homepage.

    The template was built before the development of the Query loop block.

    That’s not normal behavior, but without seeing the backend and doing more tests, it’s hard to tell what the cause is.

    Let us know if you are interested in finding it out 🙂

    #2468797
    Brad

    Hi Ying – I finally figured out why this query loop was miss-behaving and showing 3 posts when the loop was set to 2.

    It’s sticky posts! When I removed the sticky post only 2 items appeared and when the loop was set to 3 and the stick post enabled 4 posts appeared..

    Site in question is: https://foodbanksalberta.ca/ . See lower ‘latest news’ section.

    So is this a bug that needs fixing or is there a workaround?

    Thanks,
    Brad

    #2468816
    Fernando
    Customer Support

    Hi Brad,

    I see. That isn’t a bug. That’s normal behavior. Sticky posts appear by default.

    What you can do is add a Parameter > Sticky Posts – Exclude. Example: https://share.getcloudapp.com/7Kujpw4Q

    This should resolve the issue.

    #2468828
    Brad

    Ooooh.. That’s handy. Didn’t see that parameter option.

    Thanks very much!

    #2468840
    Fernando
    Customer Support

    You’re welcome, Brad!

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