5 Easy Steps to Convert a PSD to WordPress Theme (Bootstrap)

psd to wordpress

Did you know that every day, 50,000 new WordPress sites come online? How are you going to stand out from the crowd in an ocean of so many different sites? One sure method of immediately attracting attention can be to create your own, unique, custom theme converted from PSD to WordPress. This would be designed specifically for your own site – and your site won’t be one of the thousands of cookie-cutter sites out there!

There are three standards when designing a website theme. PSD (Photoshop files), WordPress (WP) and fairly recently these last few years, Twitter Bootstrap – a framework for developing responsive sites that industry professionals are using these days.

In this post, we’re going to give you a complete and easy guide on how to combine all three: how to convert a PSD to a WordPress (Bootstrap) theme, in 5 easy steps.

Later on in this article, you’ll find templates, ready for download, for you to use as a basis for this tutorial. In case you want to see other articles, please do visit other parts of our site, with in-depth tutorials and articles.

But why would you want to convert a PSD file into a Bootstrap WordPress theme?

What is a PSD?

PSD is short for PhotoShop Design.

This is because Photoshop is the single piece of software which is most popular with graphic designers and how most WordPress website designs are created. Using Photoshop, a designer will create a unique website design for you. This will be saved as a Photoshop design file, or a PSD file. This design can then be given to WordPress developers who will turn this into a theme.

What is PSD to WordPress?

PSD to WordPress is the process of converting a Photoshop design file to a working WordPress theme using Bootstrap or other methodologies and frameworks. Simply put, you provide a custom design, and it is converted to fully functional WordPress theme!

Most people who have been in or around the design and web design industry can easily understand this terminology – just like they would understand any other design terms which are not familiar to people outside of the niche (kerning, CMYK, padding, typography, leading, Serif, etc.)

What is a WordPress Theme?

There are two primary aspects to creating a WordPress website usually.

  1. The actual look of the website, and
  2. the content of the site.

In WP, the most popular CMS for creating a site, what the website looks like is independent of the content. You could change the way your WordPress looks completely while still keeping all the content.

This is because what the website looks like is actually defined by a WordPress theme.

Think of themes like you would for smartphones, for your desktop computer or laptop or anything else which can be “skinned” to your preference. The template or theme you use can be used to “skin” the content, or give it a look and feel which you are opting for.

WordPress themes are a collection of PHP files which contain “commands” or specifications that define the colors and patterns, the styles, the icons, the fonts, the sizes of headers and text, the buttons and essentially the whole look of all of the elements of the website you are designing.

There is a whole industry around these designs, where you can either get your template for free or buy one which is already made (typically called premium), for anything from $25 to a few hundred dollars.

There is also the option to create your own custom design, rather than opting for a popular product that has already been created (and used many times before). This is the actual process of converting a PSD to a WordPress theme (what your website will look like in the end).

Going forward, we will guide you to the exact procedure of creating your own design.

Converting a PSD to WordPress theme

We’ve broken down the process of converting a PSD to WordPress into 5 important steps:

1. Slice the PSD File

In terms of our PSD to Bootstrap tutorial, “Slicing” is the first and foremost thing in the entire PSD to responsive WordPress conversion process.

The term “slicing” might seem quite confusing to you at first, but don’t worry too much about it. Slicing refers to cutting and dividing a single image file into multiple image files, each of which contains different design elements of the whole design. Some people refer to those as splicing because it is creating separate elements from a single design “organism” which will eventually be rearranged or synthesized and morphed into a complete design.

This is crucial since you can’t code a template/theme from a single image design file.

Therefore, to design a web page, you first need to slice the main image file into many individual image files and then sew them together seamlessly.

PSD Slicing to convert to HTML and CSS and eventually to Bootstrap

Usually, most web and graphic designers prefer to use Adobe Photoshop for slicing.

Although the same thing can be done using an equivalent image editing software like GIMP (GNU Image Manipulation Program) or any other imaging software package, we highly recommend you use Photoshop since it makes the job easier and faster, with tools such as Layers and Layer Masks, extracting Metadata, blending, manipulating and using PSD files and RAW images.

Whatever software/application you use, the main point is to come up with pixel-perfect image files in the end – representing the different elements of your eventual design.

Besides that, you don’t need to cut design elements – like header/footer color and solid color background – in full, which can be created dynamically. Instead, only cut design elements – like buttons and images – that cannot be created dynamically.

Find below a YouTube video which explains the basics of PSD file slicing:

2. Bootstrap your theme

Once you have your image design file sliced, go to https://getbootstrap.com and download this version of Twitter Bootstrap from there. After completing the download, extract the zip file in a folder.

Now if you open the extracted folder, you’ll find three folders – css, fonts and js – inside it.

Note that one of the primary uses of this framework is because it makes extensive use of media queries to be able to create designs which work in any kind of device, allow your design to flow seamlessly between one size of device to another (xs – Extra Small, for mobiles, sm – Small, for tablets, md – Medium, for laptops and desktops and lg – Large, for Large desktops).

This is called responsive web design.

Additional Reading: CSS Frameworks Or CSS Grid: What Should I Use For My Project? (Smashing Magazine)

3. Create Index.html and Style.css files

The next step is to code the sliced elements into HTML/XHTML format and style them using the CSS. For this, you need to create an index.html and a style.css file, which requires you to have enough mastery over HTML CSS. Essentially, we are converting the PSD to HTML, before we can proceed to the next steps.

Aside: HTML or XHTML represents (EXtensible) HyperText Markup Language, whiles CSS represents Cascading StyleSheets.

Since you want to develop your theme using Bootstrap, you’ll have to initialize Bootstrap in the head section and the associated JavaScript in the body section of your index.html page as follows:












Now you can make use of Bootstrap components in your HTML template. For example, here we’re building a simple web page with a navigation menu and thumbnail components.

The .min.js part of the bootstrap libraries, means the file has been minified for performance reasons:
















About


...


Explore









Projects


...


Explore









Services


...


Explore








© WPBootstrap 2015







If you open this file in your browser, it should look something like this:

BootStrap WordPress Theme - 1st draft

As you can see, no custom CSS is working on this page currently. So to style the contents of the html page according to our requirements, we’ll create a custom style.css file. For our example, we’ve added the following code to my custom CSS file:

.navbar {
background:#222222;
margin-bottom:0px;
border-radius:0px;
}
.navbar-brand {
color:#FFFFFF;
line-height: 50px;
padding-left: 10px;
}
a.navbar-brand:hover {
color:#FFEB3B;
}
.navbar ul {
padding-right:4%;
}
.navbar ul li a {
color:#FFFFFF;
margin-right:10%;
}
.navbar ul li a:hover {
color:#222222;
background-color: yellow;
}
a.btn-primary{
background-color: #E91E63;
color:#FFFFFF;
}

To get our newly created custom CSS file work, we need to include it in our HTML page (just like we did bootstrap.min.css). So include a reference link to the style.css file in your index.html file, just above the line where you referenced bootstrap.min.css.








Now open index.html file in your browser again and you’ll see the change – our custom CSS is working now, you can see the header bar at the top and the buttons with a different color from the default bootstrap buttons.

All of the changes have been defined via the CSS file above.

Convert PSD to WordPress BootStrap Theme - Draft 2

This was just a simple example.

Likewise, making use of Bootstrap, you can code your entire PSD file (of course, after slicing) into HTML. At the end of this step, you’ll have two files in hand:

  1. index.html and another is
  2. style.css.

So far we were mostly on a PSD to Bootstrap tutorial. Now comes the conversion to a Bootstrap WordPress theme.

IS the above is a bit too much work for you? Would you rather not start from scratch? We’ve got a solution for that!

This bundle of WordPress starter templates will help you get started with a number of starter themes that you can use to eventually produce your own custom design.

Download the 20 WordPress Starter Theme bundle now

As you can see converting from PSD to HTML is quite an important part of the whole process, but when you’ve got this out of the way, things get a little bit easier.

4. Create WordPress Theme Structure in index.html

The main reason for converting a Photoshop design file to WordPress is to create a fully functional website template that could be uploaded to the website dashboard.

Such themes as Divi and Avada and other popular themes have a standard set of files that need to be implemented to be considered a valid WP theme. That’s what we will be doing in our next step.

Read More: Elementor Pro vs Divi – which one is best?

Really and truly the next phases of this conversion are around the WordPress coding structure for themes and templates because now we are taking our theme towards WP.

Now that you have the index.html file of your PSD, you need to break it into multiple php files according to WordPress themes file structure. Doing so, you would not only be able to convert the static index.html file to a dynamic WP theme but also be able to add various features and functions associated with WordPress to it.

(Aside, PHP is a server-side scripting language known as hypertext preprocessor.)

To make the programming of WordPress themes easier and for good coding practices, a typical template is made up of several PHP files such as header.php, footer.php, index.php, sidebar.php, search.php and so on.

However, you only require index.php and style.css files to create a fully-functional WordPress theme.

As a rough example, here we’re breaking our above created index.html file into three files: header.php, index.php and footer.php.

Basic WordPress template structure

Let’s start with header.php. The entire HTML code that is included at the top of index.html page will go into the header.php file.












While the middle part of index.html file will go into index.php file:






About



Explore









Projects



Explore









Services



Explore




And our footer.php file would look something like this:




© WPBootstrap 2015







This step includes breaking up the index.html file into header.php, index.php, footer.php and other necessary feature files according to WordPress themes file structure.

The complete list of files that every template should have can be found below. You can also see an image that shows how these relate to each other:

  • style.css
  • header.php
  • index.php
  • sidebar.php
  • footer.php
  • single.php
  • page.php
  • comments.php
  • 404.php
  • functions.php
  • archive.php
  • searchform.php
  • search.php

If you follow any guide to converting your Photoshop Design to WordPress, you’ll always find that they result in a structure similar to the following. The below is a more detailed view of what a final WordPress theme should look like:

WP Theme - detailed structure after following a PSD to WordPress tutorial

5. Add WordPress Tags to template

This is the final step of our tutorial.

The best thing about WordPress is that it offers a whole bunch of built-in functions in its coding structure that can be used to add custom functions and features to a website theme.

To include any of these functions into your WordPress theme, all you need to do is use the right set of built-in function tags in your files. The WordPress framework will take care of everything. This is what makes the platform so powerful!

In the previous step, we broke up the index.html file on the basis of the required file structure.

Now it’s time to add WordPress PHP tags to various theme files – like header.php, index.php, footer.php and sidebar.php etc – which we’ve got in the previous step. Finally, we combine them together to produce a highly-functional WordPress theme.

For our above example, here we’ve used the function in header.php to show our site’s title in a link:

“>



>


About the Author

David has been working in or around the online and digital industry for the last 21 years. He has vast experience in the software and web design industries using WordPress, Joomla and niches surrounding them. He has worked with software development agencies, international software companies, local marketing agencies and now is Head of Marketing Operations at Aphex Media – an SEO agency. As a digital consultant, his focus is on helping businesses get a competitive advantage using a combination of their website and digital platforms available today. His blend of technology expertise combined with a strong business acumen brings a competitive edge to his writings.