Tuesday 19 August 2014

A Definitive guideline on Designing & Building a WordPress Theme


WordPress is undoubtedly one of the most sought-after content management systems(CMSs) used by web developers across the globe. If building a new website is on your mind then choosing WordPress can turn to be your best made decision. Although WordPress renders you the freedom of choosing a suitable theme for your site, there are individuals who opt for building their own custom WordPress theme. If you too are inclined to build a WordPress theme from scratch, this is a blog you'll definitely love to read. Here, I've explained the step-by-step process of designing and building a WordPress theme.

Paying attention to the theme designing part is essential

By using Photoshop for your mockups, you can easily choose to design the theme's homepage first after laying a specific type of grid. This grid is usually 960 pixels wide and can be downloaded from a range of websites offering free pre-made grids. After having designed the homepage, you'll need to design a single page view followed by designing the category/archive page. If you plan to include special features such as custom galleries and post-types, you also need to design the same. For doing all this, you can build up a folder that's full of UI kits and other tids and bits that can be re-used during the designing process. These kits can well be utilized for creating an array of social media logos and icons.

Laying the groundwork is crucial

According to a recent research it has been found that clients aren't bothered as to how beautiful a site looks, the thing they're concerned about is what type of results are puring in once the site is fully-functional. As one of the most crucial steps in WordPress theme designing, you need to understand what the client is seeking for via his/her website. This particular information will help you build a theme that revolves around the entire site. Some of the most important goals for a website include: generating leads, improving brand awareness, selling a product etc.

Understanding WordPress theme's anatomy is mandatory


In case for the option of any reliable PSD to Wordpress Conversion Services, after designing the theme's home page and inner pages, its time for you to save the images including icons, logos, background images etc. as .png files. Have a look at any pre-built WordPress theme and you'll notice that it contains around 12 core files. While a majority of default WordPress themes included more files requiring extra customization, these additions aren't necessary everytime. Here's a list of main files that you'll be working with during the theme building process:

    index.php- this is the core file that acts as the homepage

    header.php-
this file contains everything that you want to get displayed at top of your site

    sidebar.php- this file contains everything you'd want to appear within a sidebar

    archive.php-
this is the file used for viewing categories, dates, posts by author and other vital assets of the website

    footer.php-
this file contains everything that you want to showcase towards the bottom of your site.

    Comments.php- this is the file called at the bottom of the single.php file for enabling the comments section.

    Single.php-
this file is used for viewing each individual post

    Page.php- The purpose of this file is similar to single.php with only one difference that it is being used for WordPress web pages

    Search.php-
this file is used for displaying the search results.

    404.php- this file is used for displaying the 404 errors

    functions.php-
this is the file that is used for configuring the WordPress core, without the need for editing core files

    style.css- this file is used for performing all the styling for the WordPress theme.

Next is converting HTML and CSS into a WordPress theme





Now that the original design is getting trasnformed into a code, its time for you to convert the static HTML and CSS into a WordPress theme. You can do this by simply creating a folder for the theme, followed by creating the php files as already explained above. Since all the details of the WordPress theme are contained within the stylesheet, you need to configure the same. For this, you just need to add the below code and amend the details:

/*
Theme Name: Sticky
Theme URI: http://www.blog.spoongraphics.co.uk
Description: Sticky WordPress theme
Version: 1
Author: Chris Spooner
Author URI: http://www.spoongraphics.co.uk
*/

In addition to above, you also need to ensure that the background image paths are defined correctly in your CSS properties.

Next in-line is the step of configuring the comments template

It is recommended to copy the comments template from the default WordPress theme for making any changes. This is simply because the default theme contains some key lines of WordPress code. With a handy comments file, you can use the same for a variety of forthcoming WordPress theme development projects.

Completing with the search and 404 error page building process

At such a platform of CMS conversions, search feature is pretty much a copy of the archive.php file. Here, you simply need to include a link <?php the_search_query() ?> which will display the user's search term as the title. Talking about the 404 error page, you can simply choose to configure the template for displaying the error information. All you need to do is simply include the usual get_header() ;, get_footer(); tags wherever required.

Conclusion
Now those were the steps that make up for the design and development of a WordPress theme. Hope you'd have found the blog interesting. Do share your views/opinions using the comments box below.


Also Read: Testing Your Wordpress Theme to Avert a Major Screw Up

No comments:

Post a Comment

After moderation, Comment will appear ............