Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#3030 closed enhancement (wontfix)

create a function to retrieve the categories a post is assigned to

Reported by: anks329 Owned by: anonymous
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)

category-template.php.diff (10.0 KB) - added by anks329 7 years ago.

Download all attachments as: .zip

Change History (8)

  • Resolution set to fixed
  • Status changed from new to closed

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

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.

Sounds pretty niche. And it could be done via a plugin by running a filter on the_category to remove the links.

  • 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

comment:5   ryan7 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

As Mark said, this is plugin material.

Whoops, wasn't paying attention. My bad.

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.