Create your own WordPress theme from scratch [Part 4]

In previous tutorials we have coded header.php and content.php, now we shall code sidebar.php.

Sidebar is place where you can put widgets, or links or anything which is to be quickly available from every page in the blog/website.

WordPress has special feature to manage the sidebar, you just have to drag and drop the elements in the sidebar from dashboard, and that’s it, it will be live.

So, you have to choose what you want to put in side bar. Here am going to add search,categories, recent posts, archives, and web links.

Before doing that we must first register our sidebar, to do that we must first create a file named functions.php and add this code to it.

Continue reading Create your own WordPress theme from scratch [Part 4]

Create A Very Advanced Image Gallery With Only Few Lines Of Codes With PHP, HTML, CSS

You want to create a Web image gallery and don’t want to write repetitive code? then here is simple script, place it in a directory and also images in same directory under a folder called “images” and that’t it. It will list and display images itself. Not only that, it names the images from the file name, all you to do is rename images to the requirement.

Image gallery script

Here is the code

Continue reading Create A Very Advanced Image Gallery With Only Few Lines Of Codes With PHP, HTML, CSS

Create your own WordPress theme from scratch [Part 3]

In last part we have coded index.php and header.php,  here we will code content.php, this page will display the posts and search results, and posts under categories, pages , etc.

here is the code for content.php

The above code looks to0 complicated, let me break it for you line by line. Continue reading Create your own WordPress theme from scratch [Part 3]

Access files from computer on android devices over WiFi

Your device may not have enough storage space to hold all your files you need, or maybe you just like to stream movies or music stored on your computer to your phone, or you can just see your documents you just updated on your computer in your android device. Then here is how you can do it, what you will need is a computer connected to LAN network and android device connected to same network over WiFi.

Download and install this File manager app from Google Play store on your android device.

And now check your computer”s IP, read HOW TO KNOW YOUR COMPUTER IP?[WINDOWS]

Now as you know your computer IP, note it down.

Now, open your Control Panel and Continue reading Access files from computer on android devices over WiFi

Create your own WordPress theme from scratch [Part 2]

Here is a basic theme idea, how the things are gonna be arranged in the theme.

basic wordpress theme layout

First, create a empty folder in wordpress’s main directory -> wp-content -> themes, name the new folder as testtheme.

Now create a new css style sheet named style.css and add the below code to it and save it to empty folder of theme.

That css page adds the description and info about theme to wordpress dashboard, that code basically works as theme description. Now, you can see that your new theme is available to be activated from dashboard. Don’t activate it yet, as there no other files in the folder except for the style.css page. Continue reading Create your own WordPress theme from scratch [Part 2]

Emulate and test your website on different devices virtually.

It is almost impossible to test your website for compatibility on all different devices, especially when you don’t have much time. Hence, it will ease your work when you have a tool to emulate the device and check it at different compatibility. It is possible with Google Chrome Canary, it has special feature for developers which enables to emulate few different devices. You can also emulate a custom device. So, it should be nothing but good gift for web designers.

Here is how to do it.

1) First download and install Chrome Canary from here.

2) After you have installed it. Open the site you want to check compatibility for. ( I open Continue reading Emulate and test your website on different devices virtually.

Create your own WordPress theme from scratch [Part 1]

Here is how to code your WordPress theme from scratch. If you have a HTML/CSS template ready and you want to turn it into fully functioning theme then you are at right place. You don’t need to be a very intelligent coder or a software engineer to code your own theme, all you need is little bit of time, patience and a bit of knowledge( which can be gained by just surfing for a few hours.).

Who is this tutorials for :

  • Those want to create a theme by themselves for WordPress.
  • Those who have basic knowledge of HTML, CSS and PHP.
  • Those who need help in coding.

Who isn’t it for:

  • Professional coders who is already knowing a lot about this and expecting better stuff here.
  • Those who wants to code a next-gen theme which is fully loaded, because this tutorials is for basic learners and only low level stuffs are taught here.

So lets get started…

Here is what are we gonna require first to get started.

  • Basic Template
  • CSS Styling

and we’re going to convert theme into theme.


As you know WordPress theme doesn’t have to be a single page code. We can break the main page into parts like.

  • Index.php . This page is the index page where we will include all the other blocks.
  • Sidebar.php This sidebar page, this will hold all the widgets and everything we want to include in side.
  • Header.php This is common page for all, it will handle all the heading, page linking, script linking and many things.
  • Footer.php this is also common, it will hold everything that you want to include at the bottom of page.
  • Content.php This is the page which will print the lists posts for the index.php
  • Single.php this is the page which will open when you click to open a single article.
  • Comments.php , this page will show the comments.
  • Search.php This is the page which will show the search results.
  • searchform.php this the page which holds your custom search for( it is not really necessary as there is already a built in search form).
  • Tags.php this will show the lists of posts tagged under same tags.

So, understand them. Now we must break our custom theme into parts and start coding.


Android apps you may not be knowing even existed [Part-1].

Here few apps I find useful and very helpful in certain situations. I hope they are of some use to you too.


Are you bored of you stock gallery? then probably you should get an alternate to it.

It has many inbuilt functions which aren’t available in the default gallery, this is what it makes a must have gallery app.

App Backup and Restore

This is another great app, if you want to switch the phone or temporarily remove any app then you will find this app of great use, you can back up your files in apk format and install it any other devices. Perhaps, you can also backup the apks and preserve them on your computer.


Truecaller is an app that is great for everybody, It is just like an universal phone directory. It has a huge database of contacts from many different countries. So, you will always get the name before pickup the phone, even the unknown country. Got to try this by yourselves.


This is totally a fun app, you can set the calls to ring yourself like an alarm. Caught up in useless talks? want to get out from there? then ring yourself. This is just a great app to fool people.

Music Off- Music Timer

Do you like to listen to music while you are in bed? then this is best tools for you, it turns off the music as soon as you fall asleep, automatically. It is really a smart app. Try it.

[How to] Store and Display images from MySQL using PHP

Now everything is database driven and people are willing to involve the db technology everywhere. So, lets see what we can do to throw a image on the screen not directly from the directory, where it is stored as it is. But, we will see how we can store the image in DB and display images from db.

As we are going to do it, I want to tell you what are the procedures involved in it.

First, we will read the images in the binary mode(Binary mode because it can represent anything) using a PHP script, and all the binary code will be stored in the database as is.

Next, we will give the name or number to those data for the identification.

And at last, we will create a script which will access the db, read the data into it, and display image.

Sounds simple isn’t it? Here create a table named imagedb

Now lets create a page called ” store.php ” because it the page we will use to read the images, and store it in DB.

The code we will add to it are

Save the file, and now create a new file called “images.php” and add this code below. this is the page which will fetch us image from the DB.

$data = $sth->fetchAll();
echo $data;

Now type the url http://localhost/path/to/image.php?id=id_u_used , tadaaa, you can see the image.

if you want to put your images somewhere, just use

<img src=”image.php?id=image_id” />