From time to time I run across a theme / template where I’ll need to display comments along with the posts on a home / category page. What’s worked well for me is to call a function called “get_approved_comments()“, which needs to know one argument, the post id. The site I’m working on now uses something real similar to the code below: » Read the rest of this entry «
Display WordPress comments on the home page
March 17th, 2010 § 0
Rotating clouds in the background
March 11th, 2010 § 0
This is from a piece of code I hacked up about 9 months ago. It was pretty fun, but kind of a time waster. Luckily, my employer also got a kick out of it when they saw it. We didn’t use it in production, until the site was at the end of it’s lifespan & even then, you could only see it through an easter egg in the site. » Read the rest of this entry «
Copying a file from a remote *nix computer to my local machine
January 27th, 2010 § 0
Secure File Copy or “scp” is one of those handy tool’s I use from time to time when ssh’d into another server or computer. It’s also one of those I don’t use enough to remember and always have to look up. So, I figured I might as well put it out there in a location I know I can remember (besides Google).
Ok, so on my “terminal” window (I’m on a mac, but pretty sure it’s the same for any other *nix machine, with maybe just a few variances in syntax), I type the following:
Listing out Database Table Names
December 28th, 2009 § 0
Ok, for WordPress & WPMU, let me preface this post with saying standard WordPress tables can be found by using the $wpdb object (paste the below code and you might be surprised on what’s available to you).
echo "<pre>"; print_r($wpdb); echo "</pre>";
But, let’s say the plugin you’re working with in WordPress isn’t in the $wpdb object & you still need to grab a list of non-standard tables, I’ve been using the below code to grab the information I need. » Read the rest of this entry «