When building templates for WordPress, you generally have pagination functions that come from the application itself.
These incude things like:
And there are a few other posts that give you greater granularity around taxonomies such as get_adjacent_post().
I recommend reading all of the above links because they are useful if you’re building a theme, working with custom post types, or are simply looking for a deeper understanding of some of the common template tags.
If, however, you’re looking for an easy way to write your WordPress pagination utility (which I’ll explain the rationale for momentarily), then the rest of this post will cover exactly that.
Continue reading “WordPress Pagination: A Simple Utility (And Why) Whenever you’re building a web application for someone, there are bound to be nuances in which native WordPress functionality may not work. “
After all of the preliminary content, we are finally at a place where we are ready to begin resolving the coding standard problems thrown by our IDE and by our code quality tools.
In doing this, I’m going to be breaking down the content into two posts:
- the first post is going to focus solely on refactoring the existing code,
- in the next post, we’re going to look at refactoring the structure of the plugin to enhance the organization and architecture.
For now, though, let’s take a look at the errors the code sniffer is throwing and see if we can’t bring it up to more modern standards.
Continue reading “WordPress Widgets: Refactoring, Part 2 Let’s take a look at the errors the code sniffer is throwing and see if we can’t bring it up to more modern standards.“
Though this is something I think anyone with a domain, self-hosted site, and email should use, it’s also something I think is important for us – as those who provide services to others – should use.
Specifically, I’m talking about keeping domains, hosting, and email separate so if you opt to change, say, your hosting then you can keep all of the parts working with as little downtime as possible.
In this post, I’m going to cover how to do it, the services I recommend (and no, none of these are affiliate links), and then how each piece works independently of one another to provide the most seamless experience possible.
Continue reading “Keeping Domains, Hosting, and Email Separate In doing this, you can keep all of the parts working with as little downtime as possible.“
Back in February, I opted to take a social media sabbatical which is nothing more than a fancy way of saying “time off of social media.” This was a continuation of something I did last year, too.
Then, back in December, I took the month off of pretty much every social network of which I was a part and thoroughly enjoyed the time away. But it wasn’t because of anything such as removing myself from something bad.
Over the year, I’ve begun to question what I think about social media as a whole, but I think that time away from it serves me well (that is, me personally – I don’t pretend nor attempt to make this prescriptive for anyone else).
Anyway, with us heading into the final month of the year and with the success that I’ve had in months past, I thought it might be time for me to do this again to close out the year.
This time, though, I might remix it a little bit.
Continue reading “The Third Social Media Sabbatical of 2018 So here it is: My final social media sabbatical for 2018 starting today.“
The last post included a lot of information on setting up code quality tools in your WordPress development environment, but they are necessary if we are going to be doing a lot of refactoring.
But as I mentioned at the start of this post, laying code quality tools first provides us with a foundation we can use as we refactor the boilerplate (which we clearly need to do given the amount of red shown by GrumPHP).
Honestly, I see these as necessary if you’re going to be doing any type of development hence the need to show how to set them up.
Regardless, the previous post shows just how much work we have cut out for us, right?
Now we’re going to start with refactoring the WordPress Widget Boilerplate.
This will not only improve the code quality but also walk us through some object-oriented principles that we can apply when building our widgets and we can apply in future WordPress development efforts.
Continue reading “WordPress Widgets: Refactoring, Part 1 This will improve the code quality but also walk us through some object-oriented principles that we can apply in the future.“