WordPress and PHP coding
Experiments, tutorials, scripts and possibilities in WordPress, key plugins and pure PHP to those who want to learn more together with us. References to latest changes on WordPress codex, classes and libraries built to help you coding better and a few tutorials and discussions useful for those who live WP daily.
RECENT
CSS: why are you enqueing yet another stylesheet?
WordPress became the world’s largest CMS platform for a bunch of reasons. However, the main reason is certainly the way it can be enhanced with both plugins or code. Most people working for building WP websites nowadays are web designers, rather than fullstack or PHP devs. No problem here, and some of them already use top-notch frontend tools which avoid JS/CSS bloat or redundancy. Unfortunately, when it comes to create or tweak themes or plugins, […]
How to easily implement background processing in a WP website
Background processing can be a pretty handy feature on websites with huge traffic. Some WP plugins successfully use that to reduce the bloat of consuming tasks. However, put up a totally new system for queuing tasks can be somewhat laborious. But no problem: fortunately, WooCommerce offers a ready-to-use library that you can rely on. Action Scheduler This is the name of the script that makes the background processing feature simple for WordPress. If you have […]
Generating entities from WP database with Propel ORM
Sometimes the way WP structure of making queries can be a pain in the ass. It works indeed, but most of those who opt for an OOP way may feel disappointed. Luckily, WordPress is still PHP and can be used and manipulated in several ways – which means the MySQL database cane be also accessed by any other script. Github examples bring experiments using Eloquent or Doctrine for creating a bridge in which entities can […]
Coding for WP without Git – are you really a dev?
Lately I’ve been involved in a couple of WP dev projects that also involved some other professionals. Sadly, that proved an old theory of mine: most WP plugin “devs” don’t use Git. While programming nowadays without any version control sounds like suicide, many so-called devs are sending ZIP files attached in e-mails or even via WhatsApp. Let’s not talk about the hundreds of tools for testing, deployment or code linting made possible by using Git […]
How to limit Woocommerce’s backorders
Stocks are key for any e-commerce. They tell you how many items you can actually offer. But sometimes you want customers to buy, even if stocks are gone. So you can admit backorders. Woocommerce, like many other shop scripts, allow managers to admit backorders from customers. All you need to do is to click in a checkbox, and done – customers now can buy even if stocks are empty. Now, a problem: what if sales […]
more
Headless wordpress and why it mostly doesn’t make any sense
Well, a simple search in the web nowadays and you can find thousands of tutorials about using WordPress in a headless way. As modern as it sounds, the […]
WordPress 5.8 – template editor can be a game changer
WordPress 5.8 will ship with the new template editor. Like Elementor and some other editors, this can be a game changer not only for designers – but especially […]
How to async or defer JS to make Google happier
SEO gurus and website owners became paranoid with Page Insights’ issues lately. Although most of them simply refuse to understand how a 100% optimization may affect the number […]
WP-CLI: first steps on WordPress’ command line tools
Before any trend of using Composer, NPM, Yarn or any other command line tool within WordPress’ themes and plugins development, devs have already been using a set of […]
Best and worst builders for WP developers
Website builders and block editors are consolidated within WP community. And even for devs, losing time with layouts is useless when you cancache just build templates in minutes. […]
Making error 500 easier to find and fix in WordPress
Debugging is part of any developers or even web designer or site administrator. However, some errors and exceptions are really hard to track, as messages are not clear […]
How to remove metaboxes from the WP block editor
There has been a while since the WP block editor, or “Gutenberg”, was first introduced to the community. While the possibilities of the editor are obviously immense, especially […]
How to easily hijack the browser back button and why you shouldn’t do it
That has been a practice widely used by “SEO specialists” to retain users for more time within their websites. The trend led to a large number of WordPress […]
How to send emails to users inactive for X days in WordPress?
Sending emails in WordPress is something really simple. Yet, a lot of users, admins and even web designers and developers face troubles while triggering the mailer. We are […]
Create a simple PSR-4 compliant autoloader for any plugin
A lot of PHP developers involved with WordPress projects, especially those developing plugins, opt for using Composer. Not only for requiring libraries they can use, but also for […]