Create A WordPress Themes

945

WordPress themes is the most used and popular blogging platform around the web. Its flexibility, usability and customizability are the main reasons people regard WordPress so high. Another reason is the huge array of themes available for WordPress – you can create almost anything, from online magazines to advanced e-commerce businesses. wordpress themes You can either get themes for free or pay for them. Of course, you get what you pay for — yet don’t be too eager to spend your money on something you might not even need. If you’re just starting out with WordPress I suggest reading Choosing a WordPress Theme: Free or Premium? After that you might consider whether you really want to pay for that premium theme. wordpress themes If the answer is no, continue reading and check out these 80 professional, beautiful and free WordPress themes from 2012 — the best free themes that can be found!

If you started with an HTML ( + CSS) website, you don’t have to throw it all away when moving to WordPress. You can convert your HTML into WordPress and run your (now more powerful) website on the dynamic WordPress platform.

Or maybe that’s not the case. Perhaps you are just wondering how to convert a client’s HTML design into a fully-fledged WordPress theme. Or maybe you would like to learn basic WordPress (+ PHP) programming from the more-familiar HTML side.

Whatever the reason you are here today, this WordPress tutorial will introduce you to the basics of creating a WordPress theme from HTML. So, get a code editor (I use and recommend Notepad++, and SublimeText is another great option) and a browser ready, then follow this simple guide to the end.

Naming Your WordPress Theme

First things first, we have to give your theme a unique name, which isn’t necessary if you’re building a theme for your website only. Regardless, we need to name your theme to make it easily identifiable upon installation.

General assumptions at this point:

  • You have your index.html and CSS stylesheet ready. If you don’t have these files, you can download mine for illustration purposes
  • You have a working WordPress installation with at least one theme e.g. Twenty Fourteen
  • You have already created a theme folder where you’ll be saving your new WordPress theme :)

Let’s get back to naming your WordPress theme. Open your code editor and copy-paste the contents of your stylesheet into a new file and save it as style.css in your theme folder. Add the following information at the very top of the newly-created style.css:

/*Theme Name: Your theme's name
Theme URI: Your theme's URL
Description: A brief description of your theme
Version: 1.0 or any other version you want
Author: Your name or WordPress.org's username
Author URI: Your web address
Tags: Tags to locate your theme in the WordPress theme repository
*/
Do not leave out the (/*…*/) comment tags. Save the changes. This info tells WordPress the name of your theme, the author and complimentary stuff like that. The important part is the theme’s name, which allows you to choose and activate your theme via the WP dashboard.

Breaking Up Your HTML Template into PHP Files

This tutorial further assumes you have your HTML template arranged left to right: header, content, sidebar, footer. If you have a different design, you might need to play with the code a bit. It’s fun and super easy.

The next step involves creating four PHP files. Using your code editor, create index.php, header.php, sidebar.php and footer.php, and save them in your theme folder. All the files are empty at this point, so don’t expect them to do anything. For illustration purposes, I am using the following index.html and CSS stylesheet files:

INDEX.HTML

 

<!DOCTYPE html>
<head>
		<meta charset="UTF-8">
		<title>How To Convert HTML Template to WordPress Theme - WPExplorer</title>
		<link rel="stylesheet" type="text/css" media="all" href="style.css"/>
	</head>
	<body>
		<div id="wrap">
			<header class="header">
				<p>This is header section. Put your logo and other details here.</p>
			</header><!-- .header -->
			<div class="content">
				<p>This is the main content area.</p>
			</div><!-- .content -->
			<div class="sidebar">
				<p>This is the side bar</p>
			</div><!-- .sidebar -->
			<footer class="footer">
				<p>And this is the footer.</p>
			</footer><!-- .footer -->
		</div><!-- #wrap -->
	</body>
</html>

 

CSS STYLESHEET

#wrap{margin: 0 auto; width:95%; margin-top:-10px; height:100%;}
.header{width:99.8%; border:1px solid #999;height:135px;}
.content{width:70%; border:1px solid #999;margin-top:5px;}
.sidebar{float:right; margin-top:-54px;width:29%; border:1px solid #999;}
.footer{width:99.8%;border:1px solid #999;margin-top:10px;}

You can grab both codes if you have nothing to work with. Just copy-paste them into your code editor, save them, create the four PHP files we just mentioned and get ready for the next part. Open your newly-created (and empty)header.php. Login into your existing WordPress installation, navigate to Appearance –>> Editor and openheader.php. Copy all the code between the <head> tags and paste it into your header.php file. The following is the code I got from the header.php file in Twenty Fourteen theme:

<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width">
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
	<!--[if lt IE 9]>
	<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
	<![endif]-->
	<?php wp_head(); ?>
</head>

Then open your index.html file and copy the header code (i.e. the code in the <div class= “header”> section) to your header.php just below the <head> tags as shown below:

<html>
	<head>
		<meta charset="<?php bloginfo( 'charset' ); ?>">
		<meta name="viewport" content="width=device-width">
		<title><?php wp_title( '|', true, 'right' ); ?></title>
		<link rel="profile" href="http://gmpg.org/xfn/11">
		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
		<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
		<!--[if lt IE 9]>
		<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
		<![endif]-->
		<?php wp_head(); ?>
	</head>
	<body>
		<header class="header">
		<p>This is header section. Put your logo and other details here.</p>
	</header>

Then add…

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
…anywhere between the <head> tags in the header.php file to link your stylesheet. Remember also to put the <html> and <body> opening tags in the header.php as shown above. Save all changes.

 

Adding Posts

Your HTML template is about to morph into a WordPress theme. We just need to add your posts. If you have posts on your blog, how would you display them in your custom-made “HTML-to-WordPress” theme? You use a special type of PHP function known as the Loop. The Loop is just a specialized piece of code that displays your posts and comments wherever you place it.

source : http://www.wpexplorer.com/create-wordpress-theme-html-1/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

0%
  • User Ratings (0 Votes) 0
Compartilhar.

Autor

945 Comentários

  1. Pingback: can i buy cialis in toronto

  2. Pingback: cialis 20 mg cost

  3. cost of tadalafil without insurance ed drugs – much does cialis cost without insurance
    п»їhow much does cialis cost with insurance

  4. Pingback: buy cialis online best price

  5. Pingback: for daily use

  6. Pingback: isotretinoin online no prescription

  7. Pingback: quick cash advance bowling green

  8. Pingback: buy canadian

  9. Pingback: buy canadian

  10. Pingback: buy ativan online legally

  11. Pingback: completely free military dating sites

  12. Pingback: priligy 30 mg daily review

  13. Pingback: hydroxychloroquine for sale

  14. Pingback: fish hydroxychloroquine for sale

  15. I am also commenting to make you know of the helpful experience my friend’s daughter enjoyed browsing your web page. She mastered some issues, most notably what it is like to have an amazing teaching mindset to let other people just master several problematic things. You undoubtedly did more than visitors’ expectations. Many thanks for displaying such good, healthy, explanatory and as well as unique thoughts on that topic to Kate.

  16. I am now not certain the place you’re getting your information, but good topic. I must spend a while studying much more or working out more. Thank you for excellent information I was on the lookout for this info for my mission.

  17. great points altogether, you simply won a new reader. What might you recommend about your post that you made a few days in the past? Any positive?

  18. Heya i’m for the first time here. I found
    this board and I find It really useful & it helped me out
    a lot. I hope to give something back and help others like you aided me.

  19. Greetings from Colorado! I’m bored to tears at work so I decided to
    browse your site on my iphone during lunch break. I really like the information you provide here and can’t wait to take a look when I get home.
    I’m amazed at how quick your blog loaded on my cell phone ..
    I’m not even using WIFI, just 3G .. Anyhow, superb site!

  20. I’ve been browsing on-line greater than three hours today, but I by no means found any interesting
    article like yours. It is pretty worth sufficient for me.
    In my opinion, if all webmasters and bloggers made excellent content as
    you probably did, the internet will probably be a lot more useful than ever before.

  21. It’s perfect time to make some plans for the longer term
    and it’s time to be happy. I have read this post and if I may I wish
    to suggest you few fascinating issues or tips.

    Maybe you can write next articles relating to
    this article. I desire to read more things approximately it!

  22. Pingback: ivermectil blue pills for men's

  23. Every Day our hacker group Will update the store with Fresh Cards, Paypal verified balance, Accounts store ( ebay,amazon,Bank login,fullz info dob ssn…)

  24. Pingback: dapoxetine fda approval

  25. Pingback: stromectol types

  26. Pingback: sildenafil citrate 100mg

  27. Pingback: cheap viagra online canadian pharmacy

  28. Pingback: cheap viagra

  29. Pingback: buy viagra online usa

  30. Pingback: viagra 100mg

  31. I’ll immediately grab your rss as I can’t in finding your
    email subscription hyperlink or e-newsletter service.
    Do you’ve any? Please allow me realize so that I may just subscribe.

    Thanks.

  32. I have been browsing online more than three hours nowadays, but I
    never found any attention-grabbing article like yours.
    It is pretty value sufficient for me. Personally, if all web owners and
    bloggers made just right content as you did, the web can be much more useful than ever before.

  33. I’ve been surfing on-line more than three hours today, yet I by no
    means found any fascinating article like yours. It’s beautiful price sufficient for me.

    In my view, if all website owners and bloggers made good content
    as you probably did, the net shall be a lot more helpful than ever
    before.

  34. Pingback: cialis mexico

  35. Pingback: where do i get cialis

  36. Pingback: cialis 2.5 mg

  37. Холостячка 2 сезон https://bit.ly/39ioLkW Смотреть онлайн шоу Холостячка 2 сезон на СТБ.
    Пост шоу можно смотреть тут. Холостячка стб 2 сезон 1-2 серия

  38. Pingback: cialis online bestellen

  39. Pingback: buy viagra walgreens

  40. I simply couldn’t depart your web site prior to suggesting that I actually loved the usual information a person provide to your
    visitors? Is gonna be back often in order to check up on new posts

  41. Pingback: viagra without a doctor prescription

  42. Pingback: buy cialis uk cheap

  43. Pingback: cialis daily

  44. It’s the best time to make a few plans for the long run and it’s
    time to be happy. I have learn this submit and if I may just I wish to suggest you few attention-grabbing things or tips.
    Maybe you can write subsequent articles relating to this article.

    I want to read even more issues about it!

  45. Pingback: sildenafil

  46. Духовные расстановки. Системно-семейные расстановки Системно-феноменологическая психотерапия.
    Организационные расстановки.
    Метод семейных расстановок по Берту Хеллингеру.
    Организационные расстановки.
    Расстановки по Хеллингеру.

  47. Pingback: stromectol for ascariasis pain

  48. Pingback: best place order viagra online

  49. Pingback: canadian viagra

  50. Pingback: sildenafil 50 mg tablet price in india

  51. Pingback: price of sildenafil 50mg

  52. Hello, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam comments?
    If so how do you stop it, any plugin or anything you can advise?
    I get so much lately it’s driving me crazy so any assistance is very much appreciated.

  53. It’s perfect time to make a few plans for the longer term and it is time to be happy.

    I have learn this put up and if I may I want to recommend
    you few attention-grabbing things or advice. Perhaps you can write next articles relating to this article.
    I desire to read even more things about it!

  54. It’s perfect time to make some plans for the future and it is time to be happy.

    I’ve read this post and if I could I wish to suggest you some interesting
    things or tips. Maybe you can write next articles referring to
    this article. I desire to read even more things about it!

  55. Hey would you mind sharing which blog platform you’re
    using? I’m looking to start my own blog soon but I’m having
    a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most
    blogs and I’m looking for something completely unique.
    P.S My apologies for getting off-topic but I had to ask!

  56. Pingback: cialis drug

  57. Pingback: can you buy stromectol at walgreens

  58. Pingback: female viagra pills

  59. I’ve been browsing online more than 3 hours today, yet I never found any interesting article like
    yours. It’s pretty worth enough for me. In my opinion, if
    all site owners and bloggers made good content as
    you did, the web will be much more useful than ever before.

  60. I simply could not depart your web site prior to suggesting that I actually loved the standard information an individual provide on your
    visitors? Is going to be back steadily to inspect new posts

  61. Pingback: female viagra

  62. Danke für Die Schönen Beitrag. Ich sind studieren dieses Thema für irgendwann . Die Produkte und Besonderheiten Sie angeben, ich war nicht bewusst Über. Ich werden nächste Ihre Site jetzt und idealerweise Sie können zusätzlich Ideen und Einsichten.

  63. prednisone 0.5 mg [url=http://prednisonert.com/#]prednisone for sale[/url] prednisone 5mg over the counter

  64. Pingback: cialis on line