Tag Archives: WordPress

Subscribe To Comments & Protected Wp-admin Folder

| Created: June 30th, 2009
WordPress Hacks 1 Comment

Earlier today I received an email from an irate commentator, accusing me of spamming him and threatening to report me. He was receiving emails from my blog, via the Subscribe To Comments plugin, but he thought couldn’t unsubscribe. The cause: my wp-admin folder is password protected.

Continue reading

Custom Page Templates – Calling An External CSS File

| Created: March 30th, 2009
WordPress Development 37 Comments

Note: Not long after writing this post, I discovered that the best way to load external CSS files is by using the wp_enqueue_style function. Similarly, the best way to load JavaScript files is by using the wp_enqueue_script function. The method outlined below is not necessary – although it may still be useful for other things to be added to the head section.

Custom page templates are a powerful feature of WordPress that can be used to make pages (not posts) do something different from normal. You can make them do pretty much anything. Obviously, this can greatly increase the flexibility of your site.

Amongst other things, I’ve used custom page templates to create a basic photo wall and a dynamic listing of jobs in China.

However, because of the way most WordPress themes are created, calling an external CSS file from a custom page template is not straightforward. Here, I explain the problem, look at the options and explain how to use ‘plugin functionality’ to overcome the problem.

Continue reading

Poll – Which WordPress Theme Framework To Use?

| Created: February 27th, 2009
WordPress Development 69 Comments

So far, my WordPress development work has consisted of writing WordPress plugins and occasionally hacking themes. I’ve always said that I wanted to write a WordPress theme from scratch, but never had time to do so. One of my sites is going to need a redesign shortly, so here’s my big opportunity.

However, with the rise of the WordPress theme framework and the limited time available to me, I’ve started thinking that the sensible thing to do is use a theme framework. But which one?

Continue reading

XAMMPLite Virtual Directory And WordPress Permalinks

| Created: February 22nd, 2009
WordPress Development 16 Comments

When I’m working on WordPress related development (ie themes and plugins), I like to run WordPress locally. This is great for trying things out before it goes live and also lets me squeeze in some development time in on the train!

My web server package of choice is XAMMP Lite, the Apache distribution that contains PHP and MySQL. Works great in general, but I had some problems with WordPress permalinks and XAMMP Lite. Here’s the solution.

Continue reading

Christmas Update – Greasemonkey, WordPress 2.7, Plugins And More!

| Created: December 23rd, 2008
General 29 Comments

First let me wish you all a very Merry Christmas and a Happy New Year! I hope you all accept my best wishes, even if you don’t celebrate Christmas.

December has been a very busy month for me and I haven’t had much time for posting. I may not get another post out this year, so I thought I’d take the opportunity to update you on some of the projects I’m working on.

Continue reading

FeedEntryHeader Featured On WordPress Weekly

| Created: November 14th, 2008
WordPress Plugin News 18 Comments

I was pleasantly surprised to find that my FeedEntryHeader plugin was featured on Episode 28 of the WordPress Weekly podcast. The mention was fairly brief,  but it’s nice to be noticed by such an influential podcast.

Continue reading

Password Protecting The Wp-admin Folder

| Created: October 3rd, 2008
WordPress Hacks 64 Comments

I recently listened to the WordPress Podcast – Episode 44. Although it’s a couple of months old now, it was quite interesting and one issue really caught my eye ear: the security related question for Matt Mullenweg at around 1:13:30 of the podcast.

Continue reading

Setting Cookies In WordPress – Trap For Beginners

| Created: September 26th, 2008
WordPress Development 52 Comments

I recently wrote about displaying ads only to search visitors in WordPress. A key part of the technique described is to set a cookie, identifying the visitor as having come from a search engine. It should have been simple, but my PHP setcookie command didn’t appear to work. Continue reading

How To Display Ads Only To Search Visitors

| Created: September 19th, 2008
Adsense Smart Pricing 96 Comments

In the past, I’ve written about only showing Google Adsense to search engine visitors, so as to decrease the chance of being smart priced. In this post, you’ll see how to improve the technique outlined previously, so that you can make more money.

Note: Although this post is about showing Adsense to search engine visitors, it’s really about determining whether a user came from a search engine or not. The technique can be used to show search engine visitors whatever you choose, not just Adsense. Continue reading

WPVote Needs To Improve Published News Section

| Created: August 27th, 2008
WordPress Opinion 20 Comments

For those of you who don’t know, there’s a new social news site for WordPress, called WPVote. I’ve been using the site for a couple of days and while the concept is great, the quality of entries are poor at this early stage. Continue reading