Posted on

How to Create a Custom Bulk Action

WordPress 4.7 introduced a way to create your own custom bulk actions for your post types.

Before that, there were plugins to do it, but now that it’s in the core, it’s way easier to add a new bulk action, potentially you only need three functions!

Let’s see an example together about how to add a Move to Drafts bulk action, I know that is already possible if you bulk edit posts, but it involves many clicks, while with a bulk action is only a couple clicks!

Continue reading How to Create a Custom Bulk Action

Posted on

Remove Additional CSS From the Customizer

WordPress 4.7 introduced a section in the Customizer called Additional CSS. This section should replace the Custom CSS option that many themes include in their Theme Options, or those plugins created for the same purpose.

Sometimes though, especially for developers, this could be a bad feature, because they don’t want their customers to edit CSS as they want.

How to remove the Additional CSS from the Customizer?

Continue reading Remove Additional CSS From the Customizer

Posted on

Show Products Short Description on Shop Page

Not much time ago I was searching on Google some stuff for WooCommerce, and I found a request from a user asking how to show the product short description on the shop page.

I don’t think it could be useful for all shops, but it could for some.

Here’s how you can do it.

Continue reading Show Products Short Description on Shop Page

Posted on

Scheduled Events and WordPress Cron Jobs

A clock

When I say scheduled events, I don’t mean the awesome party that you may want to sell on your site, no. The scheduled events I’m talking about are actually events that occur in WordPress.

An example would be a scheduled sale on WooCommerce, or a scheduled post in your blog that you want to publish in the future.

You can create such events also by yourself, for your theme or your plugin. Like I said before, WooCommerce uses scheduled events for sales, that’s a custom one. I used them to sync two different blogs with a plugin.

If you want to learn how to use scheduled events in WordPress, keep reading!

Continue reading Scheduled Events and WordPress Cron Jobs

Posted on

Human Readable Time Difference in WordPress

At least once in your life you have seen a site that has limited time offers, or memberships that expires on a specific date.

If you noticed, they often say “Expires in X”. That’s easy to understand for a human, but how do you do it in WordPress?

Continue reading Human Readable Time Difference in WordPress