Building a Stylish Blog Design Layout in WordPress
|
Over the last couple of weeks we’ve been through the process of creating a stylish blog design in Photoshop, coding it up into a static HTML and CSS concept, and now we’ll put the whole thing together as a fully working WordPress theme. Follow this step by step walkthrough of the various WordPress theme files, and see how the HTML is split up and injected with PHP tags to provide the complete blogging functionality.
At the end of the last tutorial, we were left with a working HTML and CSS concept of the blog homepage. Since then, a generic inner page has been styled up, to give the CSS for page elements such as comments, author description etc that appear when viewing a complete blog post. WordPress theme anatomyA WordPress theme consists of multiple PHP files. Each one of these files is called from the
The first step when creating any new theme is to create the series of files and copy across any image, Javascript or CSS assets your design uses into a new folder. /* Theme Name: Chris Spooner V3 Theme URI: http://www.chrisspooner.com/ Description: Chris Spooner WordPress Theme Version 3. Version: 3.0 Author: Chris Spooner Author URI: http://www.blog.spoongraphics.co.uk */ At the top of the CSS file, you’ll need to specify some details about your theme in order for it to be detected by WordPress. .centered { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; margin-left: 15px; }
.alignleft { float: left; margin-right: 15px; }
While you’re editing the CSS, you’ll also want to add some styling for the classes added by the WordPress WYSIWYG editor for aligning text and images to the left, right and center. Header.php Template FileThe Other tags used in the lower portion of the header file include Index.php Template FileThe index file follows on from the After the list of posts, pagination tags are inserted using Archive.php & Search.php Template FilesThe Similarly, the search template file can include the simple Single.php & Page.php Template FilesWhile the index, archive and search files display a list of posts, the Comments.php Template FileThe comments template file is called from Sidebar.php & Footer.php Template Files |
Related Posts
- Coding a Stylish Blog Design Layout in HTML & CSS
- How to Build a Custom WordPress Theme from Scratch
- How to Build a Basic Portfolio WordPress Theme
- Make an Elegant and Simple Blog Web Layout Using Photoshop
- BLANK WordPress Theme











Follow Us!