WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
40 stars 5 forks source link

Extending the Query Loop default fields #333

Open bph opened 1 day ago

bph commented 1 day ago

Discussed in https://github.com/WordPress/developer-blog-content/discussions/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.
bph commented 1 day ago

@paaljoachim This topic was approved. Would you be available to write this tutorial for the developer blog?

paaljoachim commented 23 hours ago

Hey @bph Birgit.

Yes. That I would like to do. I will need help though. I can probably ask questions in the core-dev-blog Slack channel. As this will be my first article.

bph commented 19 hours ago

That's awesome, @paaljoachim Thank you! I sent you an invitation for this repo so you can move the issue along in the Developer Blog Content Board

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.