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]