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 in Widget Areas #46132

Closed
douglas-johnson opened this issue Nov 28, 2022 · 2 comments
Closed

Query Loop Block in Widget Areas #46132

douglas-johnson opened this issue Nov 28, 2022 · 2 comments
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Edit Widgets /packages/edit-widgets

Comments

@douglas-johnson
Copy link

What problem does this address?

I am working on a site that uses a classic theme, but we're trying to use the block editor in every place possible. I would like to include a list of posts from a custom post type in a widget area, but haven't been able to make this work with features available in WordPress core 6.1.1

I am unable to add a core/query block to a widget area. I have not been able to find a specific piece of code that prevents this, but the query related blocks are not listed under the theme category when I try to add a block.

I could not find documentation about why this is the case. The closest I found was a support ticket on WordPress.org that mentioned pagination blocks were not available in widget areas.

What is your proposed solution?

It would be helpful for my transition from classic themes to full site editing if widget areas could contain core/query without pagination or if core/latest-posts supported custom post types.

@t-hamano t-hamano added the [Package] Edit Widgets /packages/edit-widgets label Nov 29, 2022
@t-hamano
Copy link
Contributor

Some blocks for FSE seem to be explicitly opted out, as seen in #32761, #32756.

From a quick test, the query loop block seems to work well,

widget

However, I would like to wait for advice from someone more knowledgeable to see if this causes any problems or issues that need to be resolved.

@t-hamano t-hamano added the Needs Technical Feedback Needs testing from a developer perspective. label Dec 1, 2022
@talldan
Copy link
Contributor

talldan commented Apr 11, 2023

I think most of those blocks are disabled as the widget editor has no way to save full site editing 'entities'. That possibly doesn't apply to the query block, as I don't think the post content is editable. Maybe it will be in the future, I don't know.

This is a duplicate of #32952, so I'll close it.

@talldan talldan closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Edit Widgets /packages/edit-widgets
Projects
None yet
Development

No branches or pull requests

3 participants