Category Archives: PHP

Better SEO Titles in WordPress 2.5

A bane of WordPress development for a long time were the awful titles generated for blog posts. When I speak of this I’m talking about the order of the blog title and the post title are put together. An example of this can be found below. And this example is better than other’s I’ve seen. On some sites where the blog/post title is long then the post title is truncated! This is unacceptable when search engines give so much weight to the content of your post titles. For a long time I circumvented this behavior by using the (read more...)

Harvest Reports WordPress Plugin

When freelancing I use the Harvest application to manage all of my time tracking. It has made invoicing painless, and while I got it thinking I was over-charging my clients, it turns out then I was not charging them enough! Anyway, after being listed as a WordPress consultant by Automattic I naturally had more WordPress contracts. I then wanted to solve a business need by allowing my clients to view their impending charges inside the familiar WordPress administration interface. This was impossible until recently when Harvest published their full API. I now have the ability, through REST, (read more...)

WP-Debug

I was using my StumbleUpon, and I came across Krumo which is a PHP debugging application. It allows you to see the content of server variables, cookies, and a lot more including specified variables such as $wp_query! After a short while I had a running WordPress plugin which should be an asset for WordPress developers. Installation Download, upload, activate. That’s it! As long as you’re logged in you’ll see the expandable menus in the footer of your page (nothing is shown to your visitors). It does rely on having the wp_footer() call in your theme so ensure that’s (read more...)

Get Categories For Current Post

I wanted a function that returned the categories associated with the current post to save screen real estate. I wanted it to be a drop-down with a JavaScript onchange, but I couldn’t find it anywhere. After some hacking I finally worked out a function. Place the following code in your current theme’s functions.php file (if you don’t have one then create it). function drop_cats() { echo ""; echo "Categories\n"; foreach (get_the_category() as $cat) { echo "" . $cat->cat_name . "\n"; (read more...)

PHP Leads Web 2.0

The subtitle to this essay is: “A Closer Look at the Hidden Drivers and Enablers of the Second Internet Revolution,” and it does give an interesting analysis on why PHP is ideal for “Web 2.0″ applications. The following reason is given: “But what makes PHP so attractive for Web 2.0? It’s the same features that make Web 2.0 itself so attractive: It’s easy to learn, easy to use, lightweight while offering full functionality and it can easily be extended. Modules and libraries make PHP work with a large number of APIs and other Web 2.0 technologies. For example, there are (read more...)