wpdb is the class that helps you to manipulate the database in WordPress. But you can not access it directly, you have to use the global object $wpdb to manipulate the database. The Database configuration is stored in wp-config.php during installation process. Highlighted like this

/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Read More…

After getting success of my responsive Google Map post, i decided to create a WordPress Plugin. It is easy to install like the other plugin. The best and favorite part of this plugin is Responsiveness. This plugin don’t need any extra functionality or CSS to make it responsive. You can freely use it on your website sidebar, posts and pages.

responsive_google_map

How to use Google Map Plugin?

It is so simple to use this plugin. Just install it like the other plugins and activate it.
Read More…

Recently i have designed a website for one of my client that want featured post on his website’s blog section. Featured Post or You can say Sticky Post, one thing with different name, already available into WordPress admin panel and it is so easy to implement.

featured-post-in-wordpress
Read More…

In some point of view when we developed a custom WordPress plugin or theme, we have to notify users for any urgent update, error or any custom message on WordPress admin section. All this done by admin_notices hook function.

Admin Notices
Read More…

Just few days back i got a request for my client to making a script that Increment Number with random interval. Then i thought to make a small plugin that generates random interval. How it works, is start number increments with a default value (1000) and set a cookie to user’s browser and every time this script update the cookies value so that when the user refresh there browser he/she get the same last incremented value. You can control the setTimeout random interval to change the value in the following line var rand = Math.round(Math.random() * (2000 - 200)) + 200;
Read More…

Short and effective script to generate random hex color. We start with random number to multiply with white color (Hex Code is 0xFFFFFF ), now we have to convert the random generated values into the hexadecimal value to display the color. To convert integer values into hexadecimal i have used .toString( radix ) where:

  • 2 – The number will show as a binary value
  • 8 – The number will show as an octal value
  • 16 – The number will show as an hexadecimal value

Read More…