Book Image

WordPress 3.7 Complete: Third Edition - Fourth Edition

Book Image

WordPress 3.7 Complete: Third Edition - Fourth Edition

Overview of this book

Back in the day, when you wanted to launch a new website, you either had to learn web programming yourself or hire a professional who would take care of the whole process for you. Those times are long gone due to WordPress and the great opportunities it brings. With WordPress, anyone can build an optimized site with the least amount of effort possible and then make it available to the world in no time. WordPress is a flexible and powerful tool that's ideal for creating both blog and non-blog websites. You can customize the features, incorporate your own design, and even write your own plugins with ease. Its versatility and ease of use have attracted a large, enthusiastic, and helpful community of users. "WordPress 3.7 Complete: Third Edition" is a practical guide for anyone who wants to start their journey as a web developer. This WordPress book takes you through a step-by-step process of planning out and then building your site. "WordPress 3.7 Complete: Third Edition" will take you through the complete process of building a fully functional WordPress site from scratch. You will learn how to create your first blog post, what the difference between posts and pages is, and how to use multimedia files to accompany your content and make it more attractive. Next, you will find out what plugins and themes are and how to use them effectively. "With WordPress 3.7 Complete: Third Edition" , you will learn all the ins and outs of WordPress and using it for publishing content on the Web. It provides easy-to-apply advice with tons of screenshots and actionable examples.
Table of Contents (19 chapters)
WordPress 3.7 Complete Third Edition
Credits
About the Authors
About the Reviewers
www.packtpub.com
Preface
Index

Creating templates within your theme


You've now got a functional basic template for your theme. It works great on the main blog page and successfully loads content for anything you can click on in your site.

However, we want slightly different templates for other types of content on our site. For example, a Single Post page needs to have a Comments form where visitors can post comments; the Page page doesn't need to show the date, category, or tags; and the Category page should show the category name.

Before we can create other templates, we need to break up the main index.php file into parts so that these different templates can share the common elements. I've mentioned many times the importance of the header, sidebar, and footer. We're going to break them up now. First, let's take a quick look at how it works.

Understanding the WordPress theme

The WordPress theme is actually composed of a number of template files. This allows the different parts of the site (such as the frontend, blog archive...