Posted on

What is a Post Meta and How to Get Its Value

Did you know about post meta in WordPress? Most probably you already use them and you don’t know that they are called post meta.

Some time ago I wrote an article about how to add fields to products in WooCommerce. Those fields are custom product fields, and their value are post meta.

If you check the article and its comments, you will notice that many people were confused about how to get their value, so let me explain you what they are and how to get them!

Continue reading What is a Post Meta and How to Get Its Value

Posted on

Pluck Fields Out Of an Object or Array

Some days ago I was working on a project and I needed to get out of an object some data, but not all of them. Specifically, I had many terms, and I needed to get only the key name from that object.

What I would have done, is looping though all the items and build an array from that with their names. But I learned about a better way!

Continue reading Pluck Fields Out Of an Object or Array

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

Posted on

Ulysses meets WordPress

A while ago I wrote a post about why I write in Markdown and I mentioned the app Ulysses for Mac, iPad and iPhone.

In that article, I said that it was not worth for me to purchase it because it was expensive. After all, I simply write on my blog, and paying 44.99 € for it was too much.

Well, today I changed my mind.

Continue reading Ulysses meets WordPress