How to Turn a Static Website Into a WordPress Theme?


Still a number of business owners are running a static HTML website. But when it comes to making changes in the static site, it becomes mandatory for the website owner to have HTML programming knowledge. So, if you lack coding skills you must migrate your static site to a dynamic platform. WordPress is a highly popular dynamic platform and its popularity is not going to abate too soon. You don't have to throw all your HTML and CSS files away when moving to WP platform. Rather you can convert your HTML files to WordPress.

When converting HTML files to Wordpress theme, generally WP default theme named TwentyThirteen is being used. To carry out the conversion you'll need a copy of HTML as well as CSS files for your current site, which will be later converted to WP theme format. There are various choices you get in terms of the program, which is used to make edits in your file. Well, you can choose text-editors such as Notepad and Notepad++ or rather use Dreamweaver instead. For this purpose, you can take up HTML to Wordpress Service.

Here's a step-by-step procedure following which you'll be able to Convert HTML to Wordpress Theme.

Step 1: Creation of Files and Folders

Begin with creating a new folder on your system’s desktop. Next, give a name to the folder. Choosing an easy to remember name won't let you forget where the folder is saved, such as the name of your WPTheme. Once you've named your folder create two files namely style.css and index.php, and add both these files to the newly built folder.

In order to make your WordPress platform recognize the files you've just created, make sure to create a comment block for the style.css file including the information like theme name, URI, a brief description, version, author and author URI.

Later, verify whether the TwentyThirteen theme is set to be your active WP theme or not. Subsequently, in the WP admin panel go to Appearance and then the Editor. Open your style.css file and copy the content from it, and paste it into the newly built style.css file.

Step 2: Create new PHP files

To Convert HTML to Wordpress Theme in the second step you'll need to open WP theme editor, wherein your existing theme will be segregated into different parts – the header, footer, sidebar and main index. You can make use of the same components for building some other WP themed site. For doing so, you'll need to divide the components into different PHP files. Next, all you need to do is to copy of the code of each HTML section and place them in their respective PHP files.

Get logged in your WP admin panel. Open the theme editor followed by the file in which you want to copy the code. For instance, open header.php file of your static website; copy the code and then paste it into the newly crafted header.php file. Follow the same procedure for rest of the files.

Step 3: Use Newly Created PHP files to fetch data

To bring in data from newly crafted PHP files, open the index.php file in your WP theme folder saved on your desktop. Add PHP code to your file top and just after the tag, as show below:



Now you have constructed your own WP theme. But wait! Your theme is developed, but you may find it to be blank. You'll have to add content to it.

Step 4: Add your content

Now you may have to add content in your theme. How will you display the content in your tailor-made WP theme? For this purpose, you require WordPress’ loop function – The Loop.

Installing the loop function, requires copying the following code into your index.php template.



Step 5: Initiate your Theme

To set-up your theme, visit a FTP client and sign in to your website directory.

Go to wp-content>>themes folder.

Upload your new theme folder to this folder. Open your WordPress admin panel, go to Appearance>>themes tab. Your theme will now be visible just click on Activate.

That's it, you are done!

About Author:

Sarah Parker is a developer comes technical writer at Designs2HTML Ltd. She loves to share relevant and useful tutorials on WordPress markup conversions on Twitter to treat technical professionals with required stuffs.

A Look At The HostGator Web Hosting Service

A Look At The HostGator Web Hosting Service

The HostGator web hosting company has a reputation within the industry for providing best hosting services. It has specialized in reseller and budget products that enable the operatives to increase the profitability of their businesses. The organization was started in 2002 and was primarily based in Dallas within Texas, USA. Their hosting is undertaken primarily from the jurisdiction but they have an international perspective. The support network is particularly effective and they offer different options for their clients. Their reputation within the industry is virtually unmatched. Nevertheless you have to be prepared to pay that little bit extra in order to get the service. 

The Site Builder is a great bit of help to the users who are not experienced in the more technical aspects of their work. According to an Independent Review Panel, this was as good as it gets in terms of budget hosting.

Services: The HostGator web hosting service enables the client to transfer lots of data within the month. The support network is provided on a 24/7 basis and there are multiple channels for the purposes of communication. A strong network means that this service can help even larger businesses to improve their competitiveness. If you want to make use of the site builder then you have to pay a bit more. It uses the Red Hat Linux 9 platform which is great for handling large volume transactions. There is a stepped series of categorized services that start at Budget. They then move on to Dedicated Servers and Reseller products. You will not be short of web space if you decide to use this product. The critical elements in the delivery include template designs, an ENOM domain reseller account and WHM Auto-Pilot billing managers. There are no restrictions on the amounts of principal domains and subdomains that you can use.

The MySQL database is expansive. It perfectly complements the CRON, PHP 4.3.1 service as well as the Curl facilities. There is the GD. Spam Assassin which is useful if you want to control the amount of communication which is available to you. Finally you get RV-Skin and Fantastico perks. A C-Panel is used to control the operations of your business. The action list includes the DOT Project, Master Flex, PHP-Auction and Nucleus. You also get the OS-Ticket and the Coppermine Photo Gallery. A multi-language platform improves the international credentials of this product. You get a multi-theme skin management software package which is particularly effective. The customization model improves the usefulness of system. The usage policy is somewhat restrictive. For example you are required to pay an extra $2 in order to gain access to the site builder. That figure is attached to every single website. However a non-reselling account can use this service for free. The confusion is not helpful.

Pros: We love the email ticket service. Other communication perks include the instant messenger and toll free phone service. The members of the team are very conversant with the technical details.

Cons: There is absolutely no reason why anyone should pay extra in order to enjoy the privilege of the site builder. The company has lost a step in terms of giving flexibility to consumers.

Rating: The HostGator web hosting service gets 4 stars out of 5. They could get more if there is a coherent pricing strategy.

Jonathan Griffin is the editor of Best Host News, a site dedicated to reporting on web hosting related consumer news. He is particularly keen to provide a place where people can find honest and up to date information on hosting providers.

Snippet : Detect TOR in PHP

This snippet helps you to detect TOR network connection in PHP

Snippet : Generate Random Password

This snippet helps you to Generate Random Password

How To Make A Port Scanner in PHP

Port scanners are created to find opened/closed ports in a host, you can get the same results in this Port Scanner coded in php by the way I wouldn't take all the credits to this because i am a php beginner so I had to make this from scratch also there are many more open source advanced Port Scanners. You can also easily add Ports if you need to.

Snippet : Base64 Encode and Base64 Decode in PHP

This snippet helps you to encode and decode your text with base64.
Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The Base64 term originates from a specific MIME content transfer encoding. - Wikipedia

Snippet : TinyURL API in PHP

This snippet helps you to shorten your URLs with TinyURL API(Function with usage)

  1. <?php
  2. function TinyURL($url){
  3.     return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
  4. }
  5. echo TinyURL('http://www.ultimateprogrammingtutorials.info');
  6. ?>
You need to replace http://www.ultimateprogrammingtutorials.info with the URL you want to shorten

Snippet : HTTP Redirection In PHP

This snippet helps you to redirect to another website/webpage.


  1. <?php
  2.     header('Location: http://www.example.com');
  3. ?>
Replace http://www.example.com with your website URL/webpage URL

Snippet : Detect HTTP User Agent in PHP

The code below helps you to detect the HTTP user agent I mean the browser version.


  1. <?php           
  2.     $useragent = $_SERVER['HTTP_USER_AGENT'];
  3.     echo "<b>User Agent </b>: ".$useragent;
  4. ?>
Return

User Agent : Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36

How To Make Login Form in PHP

PHP (PHP: Hypertext Processor) is a very widely-used scripting language, and the reasons why are obvious:   PHP integrates perfectly with plain HTML documents, is supported by the vast majority of Web hosting providers and has an easy-to-learn syntax, which you can also find in JavaScript, in some cases.

In this tutorial, we'll be experimenting with one of the much appreciated features of PHP: form processing.

How To Make A Random Text Generator In PHP

php
I don't do php at all but this is something I had to learn so to begin our Text Generator open your favorite Text Editor, I have Sublime Text 3 beta. First add the usual html>head>body tags and close the tags, after that let's add our css after body tag add these codes.
<style type="text/css">
.refresh {
    -moz-box-shadow:inset 0px 1px 0px 0px #caefab;
    -webkit-box-shadow:inset 0px 1px 0px 0px #caefab;
    box-shadow:inset 0px 1px 0px 0px #caefab;
    background-color:#77d42a;
    -moz-border-radius:6px;
    -webkit-border-radius:6px;
    border-radius:6px;
    border:1px solid #268a16;
    display:inline-block;
    color:#306108;
    font-family:arial;
    font-size:15px;
    font-weight:bold;
    padding:6px 24px;
    text-decoration:none;
    text-shadow:1px 1px 0px #aade7c;
}.refresh:hover {
    background-color:#5cb811;
}.refresh:active {
    position:relative;
    top:1px;
}
h1 {
font-family:Verdana, Arial, Helvetica, sans-serif; color:#000000; font-size:33pt
}
</style>
After that we have a PHP function, add these codes after your css codes
<?php
function Generate() {
                    $var = "abcdefghijkmnopqrstuvwxyz0123456789";
                    srand((double)microtime()*1000000);
                    $i = 0;
                    $code = '' ;
                    while ($i <= 6) {
                        $num = rand() % 35;
                        $tmp = substr($var, $num, 1);
                        $code = $code . $tmp;
                        $i++;
                    }
                    return $code;
                }           
?>
Now finally let's call the function with these codes, just add these codes after the function(php)
<center>
<h1>
<?php
echo Generate();
?>
</h1>
<a href="index.php" class="refresh">Refresh</a>
</center>

NOTE: Replace index.php with your PHP file name.

Now run the PHP, here is image of what we've made

php codes











I hope this php tutorial was interesting,Thank you for reading & do share if you thing the article deserves.

Infographic : Brief History About Programming

Here is a Brief History About Programming in a form an infographic which i found while surfing over the web pages :)

brief  Programming



Click here to view the image

How To Count Number Of Characters Using html and Javascript

hello guys , i have had an idea to make something what the title says so on i am here with a small tutorial on making what the title says . we will be using html and javascript by the waythe whole code is just 20 lines including html tags ok now open your favorite text editor and create the html tags (html,head,body) after that  go under head tag and we will use a function so put these



alright now go under body tag and put these

Insert text to You want to count:
ok now save it as you want dont forget to give the extension to php or html , i recommend php

here is a preview of what you created



How To Display IP In PHP

this is a simple tut about getting the ip in php , the script is

How To Convert Numbers To Normal Text In PHP

i am up with a simple php thing this convert number  to text for instance if you enter 100 in the textbox and click the button the label will show the text form of 100 , hundred . below is the full code(s)

form code
php code

How To Login And Logout With Session In PHP

this is a simple tutorial for beginners by the way this is also a good way to login and logout
lets make the index.php

How To Make A Image Slider With PHP/HTML And Jquary

this is something very cool by the way we gonna make it with some simple jquery ok now follow the steps

first open your php editor and make a new php file now add the css style and save it as SlideShow.php