- This topic has 11 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
July 4, 2022 at 5:22 pm #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!
July 4, 2022 at 5:36 pm #2273218Fernando 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!
July 5, 2022 at 12:42 pm #2274140Brad
Thank you – that was easy. Getting used to Generator Blocks still and dynamic content.
July 5, 2022 at 5:12 pm #2274268Fernando Customer Support
You’re welcome Brad!
July 25, 2022 at 11:37 am #2293301Brad
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,
BradJuly 25, 2022 at 12:37 pm #2293350Ying
StaffCustomer SupportHi Brad,
Do you mean you’ve set the
posts per pageto 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?
July 25, 2022 at 3:39 pm #2293461Brad
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
July 26, 2022 at 10:36 am #2294320Ying
StaffCustomer SupportThe 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 🙂
December 20, 2022 at 4:36 pm #2468797Brad
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,
BradDecember 20, 2022 at 5:33 pm #2468816Fernando 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.
December 20, 2022 at 5:55 pm #2468828Brad
Ooooh.. That’s handy. Didn’t see that parameter option.
Thanks very much!
December 20, 2022 at 6:15 pm #2468840Fernando Customer Support
You’re welcome, Brad!
-
AuthorPosts
- You must be logged in to reply to this topic.