Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Loop Block: Adding Multiple Query Loop Blocks with the option to not repeat posts already shown by previous Query Loop on same page #40903

Open
Tracked by #41405
filipanoscampos opened this issue May 7, 2022 · 7 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@filipanoscampos
Copy link

What problem does this address?

I have recently been playing around a lot with FSE and the Query Loop Block and became somewhat frustrated when trying to go wilder and add more than one Query loop Block to show my posts with different styles.

What is your proposed solution?

At the moment we can add multiple Query Loop Blocks and style them separately but, if they all follow the same settings, they will show the same posts.

It would be interesting if there was an option to not repeat posts that are already shown by previously added Query Loop Blocks.

This is possible for example, with the Post Carousel Block and the Blog Post Block, which never show repeated posts.

Yet, in the case of the Query Loop, I believe it would make sense to have this set up as an option.

This would allow users to create more adventurous styles for their websites.
For example, I built this example by manually choosing settings until I got the desired result:

Screenshot 2022-05-07 at 12 44 50

Which isn't a practical approach for websites with a large number of posts.

@amustaque97 amustaque97 added the [Block] Query Loop Affects the Query Loop Block label May 7, 2022
@annezazu
Copy link
Contributor

As part of the nineteenth call for testing for the FSE Outreach Program, the following related feedback came in that touches on the problem described above when using the "offset" pattern bundled with the query loop:

Chose the last pattern (alternating 2 column, didn’t get to see the name if there was one). Removed the default “Hello World” post which has no image. Modified the first column featured images to use a b/w duotone and added a post excerpt under the post date. Saved. Viewing the page lists duplicate posts for his pattern. https://i.imgur.com/B9JeWO0.png

It makes me wonder if we should remove this offset pattern until the above is resolved!

@celloexpressions
Copy link

This would also be helpful for sites with a lot of content that use query loops to surface posts from different types of queries (latest, taxonomy terms, etc). The alternative is a fragile approach to offset various queries to attempt to skip posts displayed by previous queries. But that falls apart quickly when mixing different terms and taxonomies with varying degrees of overlap.

@masperber
Copy link

To add to this, it would be great if a Query Loop Block on the Single Post template could exclude the post that is currently being viewed from appearing in the Query Loop. This feature was requested by a WordPress.com customer.

@annezazu annezazu moved this to Needs Dev / Todo in WordPress 6.4 Editor Tasks Aug 30, 2023
@annezazu annezazu moved this from Needs Dev / Todo to Punted to 6.5 in WordPress 6.4 Editor Tasks Aug 31, 2023
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 14, 2023
@cagrimmett
Copy link

+1

@bph bph moved this to ❓ Triage in WordPress 6.5 Editor Tasks Nov 23, 2023
@annezazu annezazu moved this from ❓ Triage to 🦵 Punted to 6.6 in WordPress 6.5 Editor Tasks Jan 29, 2024
@annezazu
Copy link
Contributor

No progress made on this front. Punting from 6.5!

@jethin
Copy link

jethin commented Feb 21, 2024

Also struggling with this issue as I'd like to 1) use different styles/attributes for the first query result 2) insert content in the middle of the query loop list and 3) include paging. My "solution" was to run the main query three times and hide sections of the list via css, but obviously this is not ideal.

@colorful-tones
Copy link
Member

Hi folks,
We are only one week away from the Beta 1 cut-off date for WordPress 6.6. This issue hasn’t seen any movement in a while, so we (the editor triage leads of the 6.6 release) have decided to remove it from the WordPress 6.6 Editor Tasks project board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants