Clean Comments Table After User Deleted

Using WordPress, you can easily delete a user and move its all posts to Administrator, but WordPress is not deleting user data from comments and comments meta tables. If you want to clean comments and comments table after deleting a user then, you have write your own code and I came up with following code…

Add New Category To All Existing Posts

Today, We will work into adding or linking new category to all existing posts in WordPress. First, find the category ID using Reveal IDs plugin or retrieving category ID from its name using custom MySQL code shown as below: $cat_id = $wpdb-&gt;get_var("SELECT term_ID FROM $wpdb-&gt;terms WHERE name='cat_name'");<!–more–>   After getting category ID, simply by using…

Create Custom Meta Box in WordPress

WordPress has become the most powerful framework for blog and web development. WordPress allows users to create custom fields; custom fields in WP are called meta-data and can be added to post. For instance, Custom fields can used to add title and description for improving SEO (Search Engine Optimization). But adding custom fields for each…

Get Attachment File Size in WordPress

When visitors are downloading a file, its a good idea to show them the file size so, they can decide by the file size if they want to download the file or not. Especially those visitors who uses small devices such as mobile phone as they care about storage space a lot.

Creating Captcha Image Security with PHP

Spam message is hard to stop because several obfuscation techniques can be used to bot attacks forms in website. Forms are easy to hack even if validations of the fields are used at the client side or server side.

Total Hits – WordPress Plugins (Very Light)

If you are running a blog then, having a total hits or visitors counter is a good idea. Today, I wanted to add a “Blog Statistics” plugin but didn’t find one which fills my requirement.

Write Text Over Image or Picture with PHP

Adding custom text over image or pictures is a good way to declare copyrights or give a simple title information to that graphical image or picture without editing the image itself. PHP made it very easy to add custom text over image or picture by using some basic functions from PHP GD.

Get Browser and Operating System Information with PHP

Long time ago I needed to get browser information with PHP and I wrote a class which uses preg_match_all function with regular expressions to get information from browser.This class will return information from browser in an array format included browser name, browser version and also operating name. It helped me so I shared to help others.