Design & Development

Steps for PSD to WordPress Conversion Using Bootstrap

Elements can be built with only a few lines of CSS codes, for example, solid color background, buttons, gradient background, rows, lines special symbols, and header and footer.

Hence, for these elements, you don’t have to slice any images. However, you only have to cut elements like background images and logos, which cannot be created dynamically. You should also consider the fact your website will load faster if it contains fewer images. 

Unzip and Bootstrap Download

After you have completed the slicing, you now have to download Bootstrap. You can then extract the zip file to a folder after you have completed the download. You will find two folders in the extracted folder called “css” and “js”.

Write JavaScript, CSS3 & HTML5

In the next step, you have to code the sliced elements with HTML5 and change its style using CSS3 and after that, it will look like PSD. For this process, you will need a good knowledge of CSS3 and HTML5.

Nowadays, you might need to write some JavaScript code to add functionalities to WordPress, even though most of the functionalities are applied through CSS3 Animations.

Now, you have to write JavaScript, CSS3, and HTML code for the sliced elements. To do this, the following needs to be created within a new folder:

  1. A CSS file by the name “style.css”.
  2. HTML file by the name “index.html”.
  3. For the image, a subfolder by the name of “images” or “img”.
  4. One more folder by the name “JS” or “JavaScript”, for storing the file of jQuery and JavaScript files.

Now, using Bootstrap, you have to code your theme. For this you have to initialize the framework within the head section and place the related JavaScript in the body section of your index.html as shown below: 

<!DOCTYPE html>

<html lang=”en”>

<head>

<meta charset=”utf-8”>

<meta name=”viewport” content=”width=device-width,initial-scale=1.0”>

<link href=”css/bootstrap.min.css” rel=”stylesheet” media=” screen”>

</head>

<body>

<script src=”https://ajax.googleapis.com/ajax/jquery/3.4.0/jquery.min.js”>

<script src=”js/bootstrap.min.js”></script>

</body>

</html>

To create a  simple web page consisting of a navigation menu and thumbnail components, you have to follow the given process:

<!DOCTYPE html>

<html lang=”eng”>

<had>

<meta charset=”utf-8”>

<meta name=”viewport” content=”width=device-width, initial-scale=1.0”>

<link href=”css/bootstrap.min.css” rel=”stylesheet” media=”screen”>

</head>

<body>

<div class=”container-fluid”>

<div class=”navbar”>

<a class=”navbar-brand” href=”#”>WordPressBootstrap</a>

<ul class=”nav navbar-nav pull-right”>

<li><a href=”#”>Home</a></li>

<li><a href=”#”>About</a></li>

<li><a href=”#”>Contact</a></li>

</ul>

</div>

</div>

<div class=”row”>

<div class=”col-sm-6 col -md-4”>

<div class=”thumbnail”>

<img src=”image1.png”>

<div class=”caption”>

<h3>About< /h3>

<p>…</p>

<p><a href=”#” class=”btn btn-primary” role=”button”>Read More</a></p>

</div>

</div>

</div>

<div class=”col-sm-6 col-md-4″>

<div class=”thumbnail”>

<img src=”image3.png”>

<div class=”caption”>

<h3>Portfolio</h3>

<p>…</p>

<p><a href=”#” class=”btn btn-primary” role=”button”>Read More</a></p>

</div>

</div>

</div>

<hr>

<footer>

<p>&copy; WordPressBootstrap 2019</p>

</footer>

</div>

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js”></script>

<script src=”js/bootstrap.min.js”></script>

</body>

</html>

As you will see in this page, there is no custom CSS present. Now, you need to add the following code to style the contents of your HTML page.

.navbar {

background:#7E7B7B;

margin-bottom:0px;

border-radius:0px;

}

.navbar-brand {

color:#FFFFFF;

line-height: 50px;

padding-left: 10px;

}

a.navbar-brand:hover {

color:#FF0000;

}

.navbar ul {

padding-right:4%;

}

.navbar ul li a {

color:#FFFFFF;

margin-right:10%;

}

.navbar ul li a:hover {

color:#FFFFFF;

background-color: #FF0000;

}

a.btn-primary{

background-color: #FF0000;

color:#FFFFFF;

}

Now, you have to include this code in your HTML page for making this new “style.css” file work. So, you have to give the link to the “style.css” file above the line where you placed the “bootstrap.min.css” file in the “index.html” file.

<head>

<link href=”css/style.css” rel=”stylesheet” media=”screen”>

<link href=”css/bootstrap.min.css” rel=”stylesheet” media=”screen”>

</head>

<body>

</body>

After this, you will be able to see the difference when you will open the “index.html” file in your browser again. After you have completed this step, you will have two files: “style,css” and “index.html”.

Converting HTML Files to WordPress Theme File Structure

You have converted your files to CSS3 and HTML format from your photoshop designed files. The next is to convert your static HTML files (index.html) to a dynamic and fully responsive WordPress file. 

To complete this process of convert HTML file into the WordPress file structure, you have to break down your “index.html” files to numerous PHP files. These various PHP files will be brought together by WordPress to create a webpage. The name of the PHP files are which makes the WordPress theme are:

  1. category.php
  2. archiev.php
  3. comments-popup.php
  4. comments.php
  5. header.php
  6. footer.php
  7. page.php
  8. index.php
  9. sidebar.php
  10. search.php
  11. style.php
  12. single.php
  13. functions.php
  14. 404.php

To build a functional WordPress theme, only “index.php” and “style.css” files are required. However, to make it easier to understand, let’s break “index.html” files into three parts: footer.php, index.php, and header.php.

For “header.php” files

<!DOCTYPE html>

<html lang=”en”>

<head>

<meta charset=”utf-8″>

<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

<link href=”css/style.css” rel=”stylesheet” media=”screen”>

<link href=”css/bootstrap.min.css” rel=”stylesheet” media=”screen”>

</head>

<body>

<div class=”container-fluid”>

<div class=”navbar”>

<a class=”navbar-brand” href=”#”>WordPressBootstrap</a>

<ul class=”nav navbar-nav pull-right”>

<li><a href=”#”>Home</a></li>

<li><a href=”#”>About</a></li>

<li><a href=”#”>Team</a></li>

<li><a href=”#”>Portfolio</a></li>

<li><a href=”#”>Services</a></li>

<li><a href=”#”>Contact</a></li>

</ul>

</div>

</div>

For “index.php” files

<div class=”row”>

<div class=”col-sm-6 col-md-4″>

<div class=”thumbnail”>

<img src=”image1.png”>

<div class=”caption”>

<h3>About</h3>

<p>…</p>

<p><a href=”#” class=”btn btn-primary” role=”button”>Read More</a></p>

</div>

</div>

</div>

<div class=”col-sm-6 col-md-4″>

<div class=”thumbnail”>

<img src=”image2.png”>

<div class=”caption”>

<h3>Team</h3>

<p>…</p>

<p><a href=”#” class=”btn btn-primary” role=”button”>Read More</a></p>

</div>

</div>

</div>

<div class=”col-sm-6 col-md-4″>

<div class=”thumbnail”>

<img src=”image3.png”>

<div class=”caption”>

<h3>Portfolio</h3>

<p>…</p>

<p><a href=”#” class=”btn btn-primary” role=”button”>Read More</a></p>

</div>

</div>

</div>

For “footer.php” files

<hr>

<footer>

<p>&copy; WordPressBootstrap 2019</p>

</footer>

</div>

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js”></script>

<script src=”js/bootstrap.min.js”></script>

</body>

</html>

Conclusion

So, by following the steps in the article, you will be able to effectively perform the WordPress conversion of the PSD files with the help of Bootstrap. However, to perform these steps, you need good technical skills. Hence you need to first go through the process thoroughly before actually trying to perform the steps.

Francis L. Crosby

Recent Posts

Make1m.com Luxury Yachts: Cruise in Unmatched Style & Comfort!

The allure of luxury yachting has captivated travellers for decades, offering a unique blend of…

2 weeks ago

GameMakerBlog.net: Your Go-To Hub for Game Devs!

In the rapidly expanding world of game development, having access to the right resources and…

2 weeks ago

PonderShort.com: Dive into Short Stories!

With the digital age reshaping how we read and share stories, short-form literature has found…

3 weeks ago

Stars-923: Unveiling the Mystical Cosmos

Stars have captivated human imagination for millennia. Among the countless celestial objects in our universe,…

3 weeks ago

Luther of Keezy.co: Digital Marketing Wizardry

In today’s fast-paced digital landscape, the role of a skilled social media strategist is more…

3 weeks ago

8 Best Rugged Laptops: Built to Withstand Harsh Environment

In today's fast-paced, unpredictable world, having a durable and reliable laptop is crucial for many…

1 month ago