Difference between revisions of "Week Ten (MGDP2060)"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→Adding a Category Description) |
||
Line 19: | Line 19: | ||
== Adding a Category Description == | == Adding a Category Description == | ||
− | You can add a customized description | + | You can add a customized description for any Category using the [[WordPress Dashboard]]. |
+ | |||
+ | Some Themes do not display the description. You must edit the Template file(s) yourself. | ||
+ | |||
+ | == Finding the Right Template File == | ||
+ | |||
+ | Hierarchy of Template files relating to Categories: | ||
+ | |||
+ | * <code>category-slug.php</code> | ||
+ | * <code>category-id.php</code> | ||
+ | * <code>category.php</code> | ||
+ | * <code>archive.php</code> | ||
+ | * <code>index.php</code> | ||
+ | |||
+ | See [[WordPress Category Archive]] and [[WordPress Template hierarchy]]. | ||
+ | |||
+ | == Some Themes don't have category.php == | ||
+ | |||
+ | Many Themes have a <code>category.php</code> file, but some don't. | ||
+ | |||
+ | In a Theme without <code>category.php</code>, the <code>archive.php</code> file may be complex, providing different output based on Category, Tag, Author, or Date. | ||
+ | |||
+ | == Make backups == | ||
+ | |||
+ | Make backups. | ||
+ | |||
+ | == Changing a Category Page's Title == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Adding Extra Information == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Reordering Posts == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Removing Post Footers == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Different Category Pages for Different Categories == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Building a Better Home Page == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Cleaning Out the Template == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Adding Text == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Creating Links == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == The Multi-Column Effect == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Comparing get_posts() and query_posts() == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Extracting information from a Post == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Making a Smarter Product Page == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Highlighting Products on Sale == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Cleaning Out the Templates (536) == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Creating single-product.php (537) == | ||
+ | |||
+ | .. | ||
+ | |||
+ | == Creating content-single-product.php == | ||
+ | |||
+ | .. | ||
== Adding a Category Description == | == Adding a Category Description == |
Revision as of 19:09, 1 November 2016
This article lists topics for Week Ten of Web Design and Development III (MGDP2060).
See also Week Nine and Week Eleven.
Contents
- 1 Categories
- 2 Creating Custom Category Pages
- 3 Adding a Category Description
- 4 Finding the Right Template File
- 5 Some Themes don't have category.php
- 6 Make backups
- 7 Changing a Category Page's Title
- 8 Adding Extra Information
- 9 Reordering Posts
- 10 Removing Post Footers
- 11 Different Category Pages for Different Categories
- 12 Building a Better Home Page
- 13 Cleaning Out the Template
- 14 Adding Text
- 15 Creating Links
- 16 The Multi-Column Effect
- 17 Comparing get_posts() and query_posts()
- 18 Extracting information from a Post
- 19 Making a Smarter Product Page
- 20 Highlighting Products on Sale
- 21 Cleaning Out the Templates (536)
- 22 Creating single-product.php (537)
- 23 Creating content-single-product.php
- 24 Adding a Category Description
- 25 Topic summary
- 26 Exercises
Categories
The textbook example expects you to create three categories, each representing a product line:
- Sofas
- Chairs
- Tables
Creating Custom Category Pages
A Custom Category Page is a Category Archive Page) which displays Posts which belong a specific WordPress Category.
This is useful when working with Custom Post Types. Custom post types do not display in for example, the "Products" custom post type has categories for product lines such as Sofas.
Adding a Category Description
You can add a customized description for any Category using the WordPress Dashboard.
Some Themes do not display the description. You must edit the Template file(s) yourself.
Finding the Right Template File
Hierarchy of Template files relating to Categories:
-
category-slug.php
-
category-id.php
-
category.php
-
archive.php
-
index.php
See WordPress Category Archive and WordPress Template hierarchy.
Some Themes don't have category.php
Many Themes have a category.php
file, but some don't.
In a Theme without category.php
, the archive.php
file may be complex, providing different output based on Category, Tag, Author, or Date.
Make backups
Make backups.
Changing a Category Page's Title
..
Adding Extra Information
..
Reordering Posts
..
..
Different Category Pages for Different Categories
..
Building a Better Home Page
..
Cleaning Out the Template
..
Adding Text
..
Creating Links
..
The Multi-Column Effect
..
Comparing get_posts() and query_posts()
..
Extracting information from a Post
..
Making a Smarter Product Page
..
Highlighting Products on Sale
..
Cleaning Out the Templates (536)
..
Creating single-product.php (537)
..
Creating content-single-product.php
..