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 Block - Output Post Class within the editor for accurate styling #33887

Closed
marktimemedia opened this issue Aug 4, 2021 · 2 comments
Closed
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@marktimemedia
Copy link

What problem does this address?

Loops that are build with the Query Block currently output the post_class on each li element in the frontend, which is great! This allows me as a theme developer to style the query block differently depending on which post type is being queried, or inherit styles I'm using for traditional archives.

Screen Shot 2021-08-04 at 12 40 28 PM

Screen Shot 2021-08-04 at 12 43 18 PM

However, the post_class is not output within the editor, meaning the content manager/admin will not see any of my custom styles when they are editing their content.
Screen Shot 2021-08-04 at 12 44 13 PM
Screen Shot 2021-08-04 at 12 43 37 PM

What is your proposed solution?

Dynamically output the post_class when the content manager/admin selects a post type to display in the Query Block, so that the editor styling can match the frontend styling

@Mamaduka Mamaduka added [Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement. labels Aug 5, 2021
@huubl
Copy link
Contributor

huubl commented Apr 10, 2024

I have created a pull request to address this issue: #60642.

@ntsekouras
Copy link
Contributor

Fixed here: #60642

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

4 participants