WordPress transients are great, but don’t always make sense with the transient data is post specific. This class lets you store transient data in post meta.
WordPress transients are great, but don’t always make sense with the transient data is post specific. This class lets you store transient data in post meta.
After copying and pasting a Gruntfile for the past few projects, figured it was time to create a template. This is the template I came up for when I’m starting a new WordPress plugin.
I’ve written out an array of Ace Editor themes probably a dozen times. Figured it was time to save it as a Gist,
Those that are supposed to know such things say that internal links are really important on your websites. But just plain links are kind of…
A couple days ago I ran a report over at GTMetrix and the screenshot looked terrible. No CSS was loading. Sure enough, when I went to the site it looked just as bad to me.
This morning I needed a quick way to have the permalink for a WordPress post as part of the text. Sure, there’s already the get_permalink()method,…
A few months ago I needed a way to cross post from a WordPress blog to a Pinterest board. Yes, there are plugins that claim to do this. But the few free ones that I tried never actually posted, and I didn’t want to spend money on a paid plugin that might not work. So I came up with my own solution.
One note though. This isn’t a WordPress plugin, although I may write one eventually. This is a script that runs from a cron job on your server. You can setup cron jobs through control panels like cPanel or directly from the command line. Either way, most people will find it a bit more complicated than just activating a plugin.
I ended up spinning this into a normal WordPress plugin that will automatically create pins when a post is published. If you’re interested you can find the Pinterest Auto Post plugin at Reliti.com.
The idea is that I didn’t really care that new posts were immediately posted to Pinterest as long as they got there relatively quickly and I didn’t have to do it manually.
It’s also important that posts only go to Pinterest once, so there needs to be a way to keep track of what’s already been posted.
What I ended up with is a script that runs every 30 minutes through a cron job, although you could change the timing to whatever you want. It pulls the most recent published post from WordPress and posts the link to a Pinterest board.
One caveat. Since Pinterest is visual and requires images, this script skips any posts that don’t have a featured image.
With that, let’s get it actually working.
Working on a small weekend project I needed an easy way to validate that a string contained a valid Twitter username. Not necessarily an active…
For a Moodle plugin I’m writing I needed a way to check if a String exists. Normally, if a string doesn’t exist then Moodle just…
Not sure why, but it looks like sorting on last name and first name is not built into the WordPress get_users method. Seems like it…