Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress 3.7 Complete: Third Edition

You're reading from   WordPress 3.7 Complete: Third Edition Nothing has simplified website production quite as effectively as WordPress, and this book makes it easier still to build a fully featured site of your own. Packed with screenshots and clear instructions, it covers everything you need for success.

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781782162407
Length 404 pages
Edition 4th Edition
Concepts
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing WordPress 2. Getting Started FREE CHAPTER 3. Creating Blog Content 4. Pages, Menus, Media Library, and More 5. Plugins and Widgets 6. Choosing and Installing Themes 7. Developing Your Own Theme 8. Feeds, Podcasting, and Offline Blogging 9. Developing Plugins and Widgets 10. Community Blogging 11. Creating a Non-blog Website Part One – The Basics 12. Creating a Non-blog Website Part Two – Community Websites and Custom Content Elements 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image