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

Part 2: A real-world use case: custom meta + block bindings + variations + usage in templates #263

Closed
justintadlock opened this issue May 6, 2024 Discussed in #231 · 6 comments
Assignees

Comments

@justintadlock
Copy link

This is part 2 of a series. The ticket for part 1 is here: #238

Discussed in #231

Originally posted by justintadlock March 1, 2024
In #222 and #225, I introduced the Block Bindings API. But I should stress that these were merely very basic introductory posts on a vast subject that will empower developers to do some really powerful things with WordPress 6.5+.

With the introduction out of the way, it's time to showcase what folks can really do with this API in more of a real-world use case. I still need to map out the full plan for this, but my general idea is this:

  • Developer is building a site that is slightly more complex than a regular blog. Book review website?
  • Requires custom post meta for data (e.g., rating, ISBN number, etc.).
  • Uses a custom Editor Plugin to add fields for entering metadata in the post sidebar.
  • Needs a custom post template for different structure.
  • Needs a custom archive template with custom Query Loop variation.
  • Uses the Block Bindings API to render post metadata.
  • Needs the Block Variations API for inserting blocks that are bound to post meta.
  • Could use some patterns for use in the theme and by the user with the Block Bindings already in place.
  • It could also showcase Block Locking to control what the user can change.

Essentially, this post (maybe even series) could touch on a lot of features in WordPress and show how developers could bring them together from Point A to Point B.

@justintadlock
Copy link
Author

This post is currently in progress. The Google Doc is here: https://docs.google.com/document/d/1F4NX0Ort3NFv8k80-4y80gIg33kbyyK8icVEuIi9mwA/edit?usp=sharing

@justintadlock justintadlock moved this from In Progress to Needs 1st review in Developer Blog Content Board Jun 4, 2024
@justintadlock
Copy link
Author

The first draft of this post is now complete and ready for review: https://docs.google.com/document/d/1F4NX0Ort3NFv8k80-4y80gIg33kbyyK8icVEuIi9mwA/edit?usp=sharing

@bph bph moved this from Needs 1st review to Done w/ 1st Review in Developer Blog Content Board Jun 5, 2024
@ndiego
Copy link
Member

ndiego commented Jun 5, 2024

I just completed a review @justintadlock and added a few comments. Looks great!

@justintadlock justintadlock moved this from Done w/ 1st Review to Ready to publish in Developer Blog Content Board Jun 5, 2024
@justintadlock
Copy link
Author

Went through both reviews from @ndiego and @bph. I'll do a final pass and cleanup tomorrow, June 6, before publishing.

@justintadlock justintadlock moved this from Ready to publish to Published (Done) in Developer Blog Content Board Jun 6, 2024
@justintadlock
Copy link
Author

Social copy:

Learn how to combine custom fields with the Query Loop block, patterns, and templates in this tutorial on the Developer Blog:

https://developer.wordpress.org/news/2024/06/06/building-a-book-review-site-with-block-bindings-part-2-queries-patterns-and-templates/

@github-project-automation github-project-automation bot moved this from Published (Done) to Ready to publish in Developer Blog Content Board Jun 6, 2024
@justintadlock justintadlock moved this from Ready to publish to Published (Done) in Developer Blog Content Board Jun 6, 2024
@bph
Copy link
Collaborator

bph commented Jul 15, 2024

social scheduled for 7/22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Published (Done)
Development

No branches or pull requests

3 participants