#3030 closed enhancement (wontfix)
create a function to retrieve the categories a post is assigned to
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Template | Version: | 2.1 |
| Severity: | minor | Keywords: | bg|has-patch |
| Cc: |
Description
Right now, the function the_category retrieves a list of categories along with links. There should be a function that does the same thing, except only returns a list of the categories and not links. This would be useful for targeting ads based on the category of the post.
Attachments (1)
Change History (8)
actually didn't realize that i couldn't update the svn myself... hopefully someone will see the need for this function and will add it in.
nb, the new functions are at the end of the attached file.
comment:3
markjaquith — 7 years ago
Sounds pretty niche. And it could be done via a plugin by running a filter on the_category to remove the links.
comment:4
Viper007Bond — 7 years ago
- Component changed from General to Template
- Keywords bg|has-patch added
- Milestone set to 2.1
- Priority changed from normal to low
- Resolution fixed deleted
- Severity changed from normal to minor
- Status changed from closed to reopened
- Version set to 2.1
- Resolution set to wontfix
- Status changed from reopened to closed
As Mark said, this is plugin material.
comment:6
Viper007Bond — 7 years ago
Whoops, wasn't paying attention. My bad.
Note: See
TracTickets for help on using
tickets.

I've created such functions and uploaded via SVN as category-template.php.diff it the also attached to this post.