How to add DNS Prefetch in a WordPress Theme without using Plugin

Go to Google, search for any keyword, hold two seconds and then click the first link, that site will open instantly on your browser without showing you any loading progress.  That is called DNS Preftech. Google defines it as: DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. This is done using the computer’s normal DNS resolution mechanism; no connection to Google […]

How to Remove WordPress Dashboard Widgets

Working on a recent project, a client asked me to clean up all the widgets that shown on default WordPress Dashboard as soon as you login. They were not using any of those widgets so wanted to see a clean dashboard upon logging in. Removing default Dashboard Widgets is easy by adding few lines of codes into your theme’s functions.php file. Copy the following code and paste it in your […]

How to display all custom fields (name AND value) in a post?

You are working on a custom WordPress theme that uses lots and lots of custom fields and you suddenly want to see what all custom fields are assigned to any post.  You can do by going into the dashboard of the site and editing the specific post but what if you want to show it on the front-end of site on the single post template? What if you have tons […]

How to enable gZip Compression in WordPress without using any Plugin?

There is nothing new in the Gzip compression rather it is similar to zip compression that we perform in our local hard disk to compress the information so that the size of the page would be reduced with certain limit. This operation will be performed in the web server that helps the site to load faster without any complication as compare to other site with same set of features. Gzip […]