PHP

How to load jQuery from Google CDN »

By default, WordPress load its own copy of jQuery in your theme. But what about loading the library from Google CDN? Here’s an easy way to do it. Paste the code below into your functions.php file: function jquery_cdn() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.3'); wp_enqueue_script('jquery'); } } add_action('init', 'jquery_cdn'); Once you saved ...

Display number of Facebook fans on your website »

If you want to display number of of likes from your Facebook page on your website, you can use the following small snippet of code anywhere on the website. In the below code we are using the Facebook Graph API which are very easy to use and implement on the website. I use the below ...

Show tweets from twitter hashtag »

As it is very easy process to get the tweets of user from twitter. But getting tweets from hashtag requires some more deep knowledge of twitter API. Today I have written a class which you can use to get the tweets of twitter hashtag. You can specify the hashtag and limit of hashtag to be ...

Writing a PHP Contact Form »

This is basic contact form in PHP which will enable you to write the contact form quickly. There are two parts in the contact form, the frontend and backend. The frontend is the form for the user to fill and backend accepts the user submitted data and then sends the email to specified email address. ...

4 Useful PHP Functions and Features You Need to Know »

Even after using PHP for years, we stumble upon functions and features that we did not know about. Some of these can be quite useful, yet underused. With that in mind, I’ve compiled a list of nine incredibly useful PHP functions and features that you should be familiar with. 1. Functions with Arbitrary Number of Arguments ...