Understanding theme structure

The rest of this chapter provides important information about the steps to take when building a WordPress theme, but here is a brief overview of the templates that make up a WordPress theme and where you find them, both on your server and within your WordPress Dashboard. Follow these steps 1. Connect to your Web server via FTP, and have a look at the existing WordPress themes on your server. The correct location is wp-content themes (see Figure 12-1). When you open this folder, you find the...

Creating the Front Page of Your Web Site

For the most part, when you visit a blog powered by WordPress, the blog is on the main page. My personal blog at http justagirlintheworld. com, powered by WordPress (of course), shows my latest blog posts on the front page, along with links to the post archives (by month or by category). This setup is typical of a site run by WordPress (see Figure 14-1). But the front page of my business site at http ewebscapes.com, also powered by WordPress, contains no blog (see Figure 14-2). It doesn't...

Categories

WordPress lets you create categories and assign posts to a specific category (or multiple categories). Categories provide an organized navigation system that helps you and your readers find posts you've made on certain topics. No default < php wp_get_archives ('after < strong> ') > Inserts the < strong> HTML tag after each link in the archive link list. true or 1 < wp_get_archives false or 0 ('show_post_count 1') > Displays the number of posts in each archive after each archive...

Creating a Word Presscom Account

To create your WordPress.com user account, follow these steps 1. In your browser, enter the URL http wordpress.com. 2. On the page that appears, click the big Sign Up Now button (shown in Figure 3-1). com main page, click the Sign Up Now button. com main page, click the Sign Up Now button. You're taken to the WordPress.com signup page at http wordpress.com signup. 3. In the Username text box, enter the name you want to use to log in to your blog from now until forever. This username must be at...

Using Tags with Parameters for Sidebars

If you've been following along in this chapter as I've covered the Header and Main Index templates and tags, you have a functional WordPress blog with blog posts and various metadata displayed in each post. In this section, I give you the template tags for the items commonly placed in the sidebar of a blog. I say commonly placed because it's possible to get creative with these template tags and place them in other locations (the Footer template, for example). To keep this introduction to...

Using the Word Presscom Dashboard

When you click the My Dashboard link in the WordPress.com menu bar (covered in the preceding section), you go directly to your WordPress.com Dashboard, starting at the Dashboard page (see Figure 3-3). Several modules within your Dashboard provide you with information about your blog, as well as actions you can take to navigate to other areas of the Dashboard, such as writing a new post, and adding a new link or blogroll. The Dashboard modules are configurable you can move them around on your...

Enabling network themes

Chapter 11 goes into great detail on how to find, install, and activate new themes with your WordPress installation. However, when it comes to enabling themes on a WordPress site that has the network feature-enabled, you have an extra hoop you need to jump through as the Super Admin (good thing Super Admins can leap tall buildings in a single bound ). On a WordPress Network site, to use a theme, it needs to be enabled in the Super Admin menu under Themes. Taking this step allows your network...

Using Sidebar Templates

You can create separate sidebar templates for different pages of your site by using a simple include statement. When you write an include statement, you're simply telling WordPress that you want it to include a specific file on a specific page. The code that pulls the usual Sidebar template (sidebar.php) into all the other templates, such as the Main Index template (index.php), looks like this What if you create a page and want to use a sidebar that has different information from what you have...

The Sidebar template

The filename of the Sidebar template is sidebar.php. Typically, the sidebar is displayed on the right or left side of your WordPress template. In the default Twenty Ten theme, the sidebar is displayed on the right side of the template, by default (refer to Figure 12-3). Similarly to the Header template, the Sidebar template is called into the Main Index template with this function This code calls the Sidebar template and all the information it contains into your blog page. Chapter 14 addresses...

Custom Styles for Sticky Category Tag Posts

In Chapter 12, I discussed the method of putting a very basic WordPress theme together, which included a Main Index template using the WordPress Loop. You can use a custom tag to display custom styles for sticky posts, categories, and tags on your blog. That special tag looks like this < div < php post_class() > id post-< php the_ID() > > The part of that template tag that is so cool is the post_class() section. This template tag tells WordPress to insert specific HTML markup in...

Authors Acknowledgments

Many, many thanks and kudos to Matt Mullenweg, the core development team from Automattic, and every single person involved in making WordPress the best blogging platform available on the Internet today. To the volunteers and testers who destroy all those pesky prerelease bugs for every new version release, the WordPress community thanks you And to each and every WordPress plugin developer and theme designer who donates his or her time, skills, and knowledge to provide the entire WordPress...

Customizing Your Blog Posts with Template Tags

This section covers the template tags that you use to display the body of each blog post you publish. The body of a blog post includes information such as the post date and time, title, author name, category, and content. Table 12-3 lists the common template tags you can use for posts, available for you to use in any WordPress theme template. The tags in Table 12-3 work only if you place them within The Loop (covered earlier in this chapter and found in the loop.php template file). Displays the...

The Header template

The Header template for your WordPress themes is the starting point for every WordPress theme, because it tells Web browsers the following The tagline or description of the blog Every page on the Web has to start with a few pieces of code. In every header. php file in any WordPress theme, you'll find these bits of code at the top The DOCTYPE which stands for document type declaration tells the browser which type of XHTML standards you're using. The Twenty Ten theme uses lt DOCTYPE html gt ,...