Website development and design blog, tutorials and inspiration

PHP

The scripting language of choice for most web designers. It’s free, easy to learn and above all there are many thousands of scripts and packages that you can run (also free!). These articles feature code snippets, tips and techniques and full scripts to help you advance your PHP powered website.

 

Removing Smart Quotes from WordPress Posts
26th January 2009PHP
WordPress has a nice feature that converts the standard quotes ( " ) to pretty "curly quotes" or "smart quotes" as they are called. This is all well and good on a textual blog, but when it comes to programming code, it can be a real pain in the proverbials.
Easy Wordpress Breadcrumb Trail
24th January 2009PHP
This is a great function which you can use to output a breadcrumb trail navigation links on your blog.
Wordpress Get the Excerpt Outside the Loop
24th January 2009PHP
The WordPress template tag the_excerpt and get_the_excerpt are great for showing a short summary of a post, in fact, this paragraph is the excerpt for this post.
Format a Number as File Size in PHP
24th January 2009PHP
This function will format a given number into a pretty file size, for example, convert 1000000 to 1MB, 3523 to 3k and so on.
Get First Sentence from a String in PHP
24th January 2009PHP
This quick PHP snippet will return the first sentence of a specified string. Very useful for generating post or page abstracts, extracts or descriptions.
How to Determine Paged Comments in WordPress 2.7
24th January 2009PHP
Wordpress 2.7 introduced paged comments out the box, however, you will probably be wanting to prevent search engines from indexing these pages to prevent duplicate content. You may also just wish to determine if a user is viewing a paged comments.
Creating Links to Posts and Categories in WordPress
24th January 2009PHP
We all know that it is good to have links posts and categories throughout your site, but maintaining hard coded links can be a pain, especially when things like permalink structure or domain name change. These two functions will allow you to create flexible dynamic links in your posts or pages.
Useful Wordpress Category Functions
24th January 2009PHP
This is a collection of extremely useful functions for working with Wordpress categories. Get parent category, and detect if current category is a subcategory or child category of the specified.