Will using green in your website design help your site make more money?

Just a random and probably ridiculous question, but I’ve wondered this for some time and even tried in the past using green in my own web development projects hoping that … Continue reading

MySQL query to find duplicate post titles in WordPress wp_posts table in database

The below (WordPress specific) will select posts that have the same post title: SELECT `post_title` FROM `wp_posts` WHERE `post_status` NOT LIKE ‘%inherit%’ GROUP BY `post_title` HAVING count(post_title) > 1 Know … Continue reading

PHP array letters A-Z

There are a number of ways to create an array of letters A-Z in PHP. The easiest one we found when we needed to do this ourselves was: $alphas=range(‘a’, ‘z’); … Continue reading

How to loop through array randomly PHP?

One method you could use to loop through an array randomly in PHP is to shuffle the array before you use it. Example, to loop through the numbers 1 – … Continue reading

Can’t find option in wordpress to turn off comments on pages?

Try the following work around: Go to your admin Click the Pages link in your Dashboard menu Instead of clicking “Edit” to edit a specific page, click on “Quick Edit“. … Continue reading

How do I setup the cronjob for KR Popular Posts plugin?

The plugin says “For the KR popular posts sidebar widget to work efficiently and also for the sidebar widget to count retweets and facebook likes you must set up a … Continue reading

How to check if a number is evenly divisible by 10 in php

To check if a number is evenly divisible by 10 in PHP you can use the following: if($num %10 == 0) { // Do something } Example $myexamplearray=range(1,100); foreach($myexamplearray as … Continue reading

How to create array of numbers 1 – 1000 in PHP without writing out each number?

You might expect to be able to use $myarray=array(1,1000); but that will not work if you are trying to create an array of consecutive numbers 1 – 1000 in PHP; … Continue reading

How to select from a mysql database where the field value has a specified length?

Maybe you need to find entries in a database where the filed value is only 3 characters in length or less than 7 characters in length or matches some other … Continue reading

How do you insert numbers at the beginning of lines of data in textpad?

If you happen to be working in Textpad and have a big file of data that you can’t possibly go through line by line to sequentially add numbers at the … Continue reading