{"id":374,"date":"2018-03-24T15:29:17","date_gmt":"2018-03-24T09:59:17","guid":{"rendered":"https:\/\/www.merahost.org\/blog\/?p=374"},"modified":"2018-03-24T15:29:17","modified_gmt":"2018-03-24T09:59:17","slug":"how-to-convert-html-template-to-wordpress-theme","status":"publish","type":"post","link":"https:\/\/merahost.org\/blog\/how-to-convert-html-template-to-wordpress-theme\/","title":{"rendered":"How to convert HTML template to WordPress theme"},"content":{"rendered":"<p id=\"1e0e\" class=\"graf graf--p graf-after--h3\">Before 20 years, the websites are developed with text and static HTML only. But as technology is growing we have lots of new ways to create any complex to simple website. There are so many options available to develop user friendly website.<\/p>\n<p id=\"0818\" class=\"graf graf--p graf-after--p\">Over last 10 years, people are having a modern websites with so many features and functionalities and this is only because of the open source CMS WordPress. Developing the website in WordPress is simple and easy process. You need to just <strong class=\"markup--strong markup--p-strong\">install the WordPr<\/strong><strong class=\"markup--strong markup--p-strong\">ess<\/strong> and select the right theme and required plugins.<\/p>\n<p id=\"5cd1\" class=\"graf graf--p graf-after--p\">Still we can find there are so many static HTML websites needs to upgrade into WordPress theme. These types of websites are not upgraded because of the site owners may don\u2019t want to change their content or they want to keep their site simple.<\/p>\n<p id=\"58fe\" class=\"graf graf--p graf-after--p\">But the actually reason of not to upgrade the website into WordPress is they don\u2019t know how to convert HTML site to WordPress site. And, they don\u2019t know who can provide <strong class=\"markup--strong markup--p-strong\">HTML to WordPress conversion service<\/strong> without affecting their content and page formatting.<\/p>\n<p id=\"220f\" class=\"graf graf--p graf-after--p\">There are so many ways to solve this problem. Below are 5 steps that we are using to convert HTML template to WordPress theme.<\/p>\n<p id=\"8b0d\" class=\"graf graf--p graf-after--p\">To manually convert static HTML website to WordPress without losing your content and design, you need to just create your own custom theme. In this process, you need to do some basic things like copy and paste and create some files and folders and then just upload the final version.<\/p>\n<p id=\"8d25\" class=\"graf graf--p graf-after--p\">Use <strong class=\"markup--strong markup--p-strong\">Sublime<\/strong> or <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/notepad-plus-plus.org\/\" target=\"_blank\" rel=\"nofollow noopener\" data-href=\"https:\/\/notepad-plus-plus.org\/\" data-><strong class=\"markup--strong markup--p-strong\">Notepad++<\/strong><\/a> to access the directory of your HTML site and the directory of your new WordPress site.<\/p>\n<p id=\"1fc8\" class=\"graf graf--p graf-after--p\"><strong class=\"markup--strong markup--p-strong\">Step 1: Files and Theme Folder Creation<\/strong><\/p>\n<p id=\"eb98\" class=\"graf graf--p graf-after--p\">First, you need to create a folder and write a proper name. You can keep this folder anywhere where you would like to keep and access easily.<\/p>\n<p id=\"a76c\" class=\"graf graf--p graf-after--p\">Open the code editor, create below files and save them all in above created theme folder. Keep open all the files so you can edit those whenever needed.<\/p>\n<ul>\n<li id=\"c84b\" class=\"graf graf--p graf-after--p\">style.css<\/li>\n<li id=\"e4e6\" class=\"graf graf--p graf-after--p\">index.php<\/li>\n<li id=\"c3ec\" class=\"graf graf--p graf-after--p\">header.php<\/li>\n<li id=\"3551\" class=\"graf graf--p graf-after--p\">sidebar.php<\/li>\n<li id=\"9f0b\" class=\"graf graf--p graf-after--p\">footer.php<\/li>\n<\/ul>\n<p id=\"c9b6\" class=\"graf graf--p graf-after--p\"><strong class=\"markup--strong markup--p-strong\">Step 2: Copy Old CSS to New style.css<\/strong><\/p>\n<p id=\"1b2c\" class=\"graf graf--p graf-after--p\">If you don\u2019t want to change your design, copy your old CSS and add into new style.css file.<\/p>\n<p id=\"dd17\" class=\"graf graf--p graf-after--p\">The beginning of your file will look like below.<\/p>\n<p><a href=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-wyP5J4FoVFh0HRZqrc9n2w.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-376\" src=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-wyP5J4FoVFh0HRZqrc9n2w.png\" alt=\"\" width=\"608\" height=\"270\" \/><\/a><\/p>\n<p id=\"3c73\" class=\"graf graf--p graf-after--figure\"><strong class=\"markup--strong markup--p-strong\">Step 3: Cut and Paste your Current HTML<\/strong><\/p>\n<p id=\"53c3\" class=\"graf graf--p graf-after--p\">In your header.php file copy and paste everything from your current index.html site. Copy all of which are above the opening div class=\u201dmain\u201d tag. Save header.php file and then close.<\/p>\n<p id=\"493f\" class=\"graf graf--p graf-after--p\">Second step is pick the complete aside class=\u201dsidebar\u201d tag from your index.html file. Copy and paste everything into previously created sidebar.php file. Save and close the file.<\/p>\n<p id=\"9495\" class=\"graf graf--p graf-after--p\">In third step, copy and paste everything after your sidebar class from index.html file into above created footer.php file. Save and close the file.<\/p>\n<p id=\"51b4\" class=\"graf graf--p graf-after--p\">And last, select all remaining things from your index.html file, copy and paste them into your index.php file. Remember just save it and keep it open.<\/p>\n<p id=\"4f3f\" class=\"graf graf--p graf-after--p\">Now, close your index.html file and move to the next step.<\/p>\n<p>&nbsp;<\/p>\n<p id=\"145b\" class=\"graf graf--p graf-after--p\"><strong class=\"markup--strong markup--p-strong\">Step 4: index.php Finalization<\/strong><\/p>\n<p id=\"df14\" class=\"graf graf--p graf-after--p\">In this step, from newly created theme\u2019s index.php file, call all the section, which we have added in other files.<\/p>\n<p id=\"8fca\" class=\"graf graf--p graf-after--p\">Place the following code at top of your index.php file.<\/p>\n<p><a href=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-og0tYIouH1YvNN78o7_9xQ.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-377\" src=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-og0tYIouH1YvNN78o7_9xQ.png\" alt=\"\" width=\"364\" height=\"58\" \/><\/a><\/p>\n<p>Place following lines at the very bottom of your index.php file.<\/p>\n<p><a href=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-uPMlXTkZ_Aqjcd1_R01bxw.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-378\" src=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-uPMlXTkZ_Aqjcd1_R01bxw.png\" alt=\"\" width=\"372\" height=\"110\" \/><\/a><\/p>\n<p>Now, we need to add some basic php code to display content to visitors. So, adding the below code to your new index.php file is your last step.<\/p>\n<p><a href=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-k2DfRamWkM5kODUTVTn0Tw.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-379\" src=\"https:\/\/merahost.org\/blog\/wp-content\/uploads\/2018\/03\/1-k2DfRamWkM5kODUTVTn0Tw.png\" alt=\"\" width=\"699\" height=\"567\" \/><\/a><\/p>\n<p id=\"a345\" class=\"graf graf--p graf-after--figure\">Finally, save and close your index.php file.<\/p>\n<p id=\"b443\" class=\"graf graf--p graf-after--p\"><strong class=\"markup--strong markup--p-strong\">Step 5: Upload your new theme<\/strong><\/p>\n<p id=\"5800\" class=\"graf graf--p graf-after--p\">Now open your installed WordPress directory and add your theme folder into <strong class=\"markup--strong markup--p-strong\">\/wp-content\/themes\/<\/strong>. Your new themes will appear in <strong class=\"markup--strong markup--p-strong\">WP Admin &gt; Appearance &gt; Themes<\/strong>. Just activate it. At the end, release your new WordPress site with your old site\u2019s content.<\/p>\n<p>&nbsp;<\/p>\n<p id=\"660d\" class=\"graf graf--p graf-after--p\"><strong class=\"markup--strong markup--p-strong\">Use Ready made WordPress themes<\/strong><\/p>\n<p id=\"1520\" class=\"graf graf--p graf-after--p\">There are so many ready-made WordPress themes available in WordPress marketplace. There are free and paid themes. You can select and choose which one is suitable and best for your business. There is a category wise filtration to find your perfect theme.<\/p>\n<p id=\"b142\" class=\"graf graf--p graf-after--p\">After selecting the theme, go back to WP admin and then Appearance &gt; Themes and then Add New and install\/activate the theme.<\/p>\n<p id=\"9e94\" class=\"graf graf--p graf-after--p\">Now, see the preview of your site. You can see there is no content and without content your site looks boring. So, we need to add the content from your old websites.<\/p>\n<p id=\"baf3\" class=\"graf graf--p graf-after--p\">You need to install the plugin called <strong class=\"markup--strong markup--p-strong\">HTML Import 2<\/strong>. For that Go to <strong class=\"markup--strong markup--p-strong\">WP Admin &gt; Plugins &gt; Add New<\/strong> and search for the plugin. After installing and activating the plugin, read the user guide.<\/p>\n<p id=\"65b5\" class=\"graf graf--p graf-after--p graf--trailing\">Now, you have a new WordPress theme site with your old content and you feel that your website is looks better then the previous one.<\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;374&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;20&quot;,&quot;title&quot;:&quot;How to convert HTML template to WordPress theme&quot;,&quot;width&quot;:&quot;122.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 122.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 16px;\">\n            5\/5 - (1 vote)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Before 20 years, the websites are developed with text and static HTML only. But as technology is growing we have lots of new ways to create any complex to simple website. There are so many options available to develop user friendly website. Over last 10 years, people are having a modern websites with so many [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":381,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[106,80,107,108],"class_list":["post-374","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","tag-convert","tag-how-to","tag-html","tag-wordpress"],"views":1,"_links":{"self":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/comments?post=374"}],"version-history":[{"count":0,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts\/374\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/menu-items\/381"}],"wp:attachment":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/media?parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/categories?post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/tags?post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}