Domain and web hosting - CHAPTER 16 CHANGING THE LOOK OF YOUR

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 441 displaying a single post and the file single.php exists in your current theme directory, Word- Press will use that template. This allows you to present single posts with a different layout. Similarly, a file called page.php will be used to display pages. For example, you might decide to use the full width of the browser for your in-depth pages with more content and not display the sidebar. In this section, I will take you through some adjustments to a theme. You will see how to remove elements you don t want and add extra information you do want. You will also learn how to adjust the CSS to make things appear differently, without needing to change the HTML generated from the template. Installing and Copying the Theme First, you need to obtain the theme that you want to modify. For the original theme to use in this chapter s example, I have chosen the c3ro mask theme by C3ro, created by Chris Carlevato (http://c3ro.com/themes/), shown in Figure 16-7. This is a beautiful, three-column theme with a graphical masthead and a fading background. It is a little unusual in that it has its two narrow informational columns, both on the right. I made a couple of changes to the original theme to make it valid XHTML, as standards compliance is an important part of WordPress. The validated theme is available from the Source Code area of the Apress web site (http://www.apress.com), as c3romask-xhtml.zip. Use this as your starting point. After you download c3romask-xhtml.zip, unzip it into a folder call c3romask. Then upload the folder and its contents to your wp-content/themes folder. Go to the Presentation administration page and select the c3ro mask theme to activate it. If you view your blog now, it should look like Figure 16-7. So that you can compare the before and after versions of the theme, you will make changes to a copy of the theme. On your local machine, in the place you unzipped the original theme, rename the c3romask directory to c3romask2. (You could instead copy the directory and not rename it in order to retain the original code on your local machine for later comparison should things go drastically wrong.) You will also need to edit the style.cssfile to change the name defined in the file. If two installed themes have the same name, even if they are in different folders, WordPress gets confused. See Listing 16-1 for the new header comment. Listing 16-1. New Theme Meta-Information in style.css /* Theme Name: c3ro mask 2 Theme URI: http://c3ro.com/themes/ Description: A modified version of c3ro’s mask theme Version: 1.0 Author: Mike Little (after c3ro http://c3ro.com/) Author URI: http://building-online-communities.com/wordpress/ */ Upload this new folder with the modified style.css into wp-contents/themes and check the Presentation page. You should now have the c3ro mask and c3ro mask2 themes listed. Activate the c3ro mask 2 theme.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply