In one of the most recent issues of The Repository (which is a worth a subscribe), I said that one of the Twitter account I recommend following is @mattmedeiros. And though he and I never see eye to eye on anything 😏, I said:
I really like what [Matt’s] doing with The WP Minute. I think his commentary, perspective on business and the WordPress economy, and the type of journalism he’s doing is different from many others.
And I meant it.
As he’s working to grow the type of news that he’s covering, he’s also getting back to something that I think that’s either been missing, fragmented, or missing because it’s fragmented too much across the various ways we’re sharing information: WordPress tutorials.
At this point, we’re half way through a major improvement to the block we’ve been working on. We have the ability to edit the content in the editor but we aren’t able to save it and because we aren’t able to save it, we aren’t able to view it on the frontend.
Now, though, we’re at a place where we can save our data, render it on the frontend, and continue to make sure that what the author sees is what the visitors see.
As I’ve done with the rest of the series, I recommend reading these first parts because they are going to bring you up to speed on everything you need to do to get up to this point:
Note that I still don’t have a GitHub repository set up for this plugin. I will once we reach a certain point, but not yet. And that’s because I think reading through the material and having to implement it versus cloning and changing a few things around can help you learn some of this material faster.
The first two articles in this series have been long. Not only long in terms of the content they cover, but long in comparison to the usual content I write. Part of this is because of the nature of what I’m trying to cover and part of it has to do with getting the basic plugin going.
We’re at a point now, though, where we can start to shorten the length of the article and focus more narrowly on the functionality and its implementation.
If you’re stumbling across this series and this is the first post you’re reading or you’ve not done any of the work prior to get everything off the ground yet (as I don’t have a GitHub repository set up for this plugin just yet – and that’s on purpose 🙂), here’s what’s been covered so far:
In the next article, we’ll start talking about how we can edit text within the context of the Block Editor, how to save the changes, and then view them on the frontend.
Originally, I planned to cover the following in a single article:
convert the element in the block editor into a field we can edit,
save the content of the field,
render the content that’s above
Instead, I’m going to cover just the first point above so we can focuses solely on the editor and how to manipulate data within its context. Then we’ll follow the article up with how to save the content and render it on the frontend.
Note that how the status is set will depend on the plugin you’re working on and whether or not you want to render a column on the All Users page for this. And I can show that in another tip in a future post.
By this, I mean that it’s one thing to actually sort the users on the All Users page but it doesn’t make a lot of sense unless there’s a column by which the status is shown and the value of said status.
Given that, here’s how we can show all users sorted by the metadata that we reviewed in the previous post.
If you are looking for WordPress guides and unbiased reviews, I recommend checking out WPKube. They also have an exclusive deals section.
Just Getting Started with WordPress? I write a lot about WordPress development but if you're just getting started, I recommend checking out WPBeginner. They have free training videos, glossary, and more.