-
Notifications
You must be signed in to change notification settings - Fork 7
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
Extending the Query Loop default fields #333
Comments
@paaljoachim This topic was approved. Would you be available to write this tutorial for the developer blog? |
Hey @bph Birgit. Yes. That I would like to do. I will need help though. |
That's awesome, @paaljoachim Thank you! And here are three links for you. They should get you started. Notes on creating and formatting a Google Doc #242 This issue also has a link to the Google Doc Template. Yes, you can always ask questions in the core-dev-blog channel, or comment on this issue. |
See also Slack discussion in #core-dev-blog |
Thinking out loud. But I do wonder if WP core has a method I can follow instead that uses newer methods that can be easy to follow. Second step is testing out the https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/extending-the-query-loop-block/ (I see that is has just been updated) |
Discussed in #324
Originally posted by paaljoachim October 22, 2024
Currently the Query Loop will show the default fields of Title, Featured image, date and excerpt.
It would be helpful to extend the Query Loop to show additional fields.
A use case.
An artist has an album post. It uses the standard fields.
Title = album name
Featured image = album cover
Excerpt = a description of the album
Date = date when the album came out
He would like to add artists whom contributed to the album.
He especially would like to add album tracks.
This means two additional fields:
Contributed to album
and
tracks
As I see it one would need to define specific blocks that will be seen in the Album preview page where the Query loop would also show these specific blocks.
It would actually be very helpful to have two methods for this. Likely the regular Json file and code snippets. Code snippets would be an easy way to add a snippet directly to the web site without even having access to the files outside of WordPress. Having a Code snippet plugin one could just add the snippet turn it on and see the result. Go forth and back between the result and the snippet to easily adjust the code.
The text was updated successfully, but these errors were encountered: