Categories
Categories allow you to group your posts together. A post can belong to more then one category. To create a category, you can either add it directly within the post, or you can create them under the categories menu item. Categories are powered by a blog_categories_model and have a grandparent class of MY_Model.
Category Fields
Below are the fields to fill out for a category:
- Name - The display name of the category
- Permalink - The URL identifier for the category
- Published - Determines whether to display the category
The Category Model Properties
The category object has the following properties:
- id
- name
- permalink
- published (returns 'yes' or 'no')
The Category Model Methods
The category object model has the following methods:
get_posts()
Returns an array of posts associated with a category.
get_posts_count()
Returns the number of posts associated with the category.
get_url()
Returns a url to that category.