- This topic has 6 replies, 3 voices, and was last updated 2 weeks, 5 days ago by David.
July 19, 2022 at 7:56 am #2287506Brian
Hi I am working on a new layout using query loops
I know I can manually choose a post to pull the image from but I want to automatic it show the lastest post featured image.
ThanksJuly 19, 2022 at 8:36 am #2287557DavidStaffCustomer Support
If that section is to be the Latest Post then you would need to add 2 x query loops.
The first one should have just 1 post with your featured image background set on the Container.
Then your other query loop will be as is with an
1so it skips the first post.July 19, 2022 at 10:28 am #2287660BrianJuly 19, 2022 at 11:40 am #2287716YingStaffCustomer Support
I don’t think you are supposed to add a query loop block into another query loop block.July 19, 2022 at 11:47 am #2287724Brian
But does it look a little overkill?
One last issue is I can’t seem to get an option to set inner container to restricted, so the content is to the left.
I can add padding to the text, but I think I am missing something obvious.July 19, 2022 at 12:45 pm #2287790Brian
I decided just to go with a fixed container so I will close this.
ThanksJuly 20, 2022 at 1:55 am #2288175DavidStaffCustomer Support
Just to cover, the issue you were having above is you had a Query Loop inside another query loop, and thats not supported today, in the future it will allow nested loops, for example loop for the Category terms and under each term show a list of posts.
For your need it would require 2 x Query Loops, both of which are separate so in the list view they would both be at the root level:
But if you’re happy with your current solution then that is great 🙂
- You must be logged in to reply to this topic.