Forums

Custom Fields for Categories (3 posts)

  1. eturi
    Member
    Posted 4 years ago #

    Hi,

    When we add a category, we have the following fields:

    Category Name
    URL Name
    Parent Category
    Description

    The question is, how can I add custom fields to it and how can i display them in the single post showing the category(es) custom values this post belongs to.

    Is there any plugin out there that do this job ? What if a post belongs to more than 1 category. The function get_the_gategory_field('<custom_field>') will return an array of pair 'field_key'=>'field_value'

    Hoping a quick answer, Regards, Ed

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    Sorry, not a quick answer, and not a good one either as I'm not aware of such a plugin. However, see the end of this thread:

    http://wordpress.org/support/topic/71615

    Beyond that, if you do not use the category description field for anything -- well, specifically for these two template tags:

    http://codex.wordpress.org/Template_Tags/category_description
    http://codex.wordpress.org/Template_Tags/wp_list_categories

    You could hack together a solution using it.

    Extending custom fields to all components of ones blog (categories, links, comments) is an occasionally requested feature (as the first link demonstrates), and one I'd like to see as well.

  3. teknoledge
    Member
    Posted 4 years ago #

    I was looking for a similar plugin but since I couldn't find it decided to develop it ;)

    http://www.flairpair.com/blog/wordpress/category-custom-fields

    Supports WordPress 2.3+

Topic Closed

This topic has been closed to new replies.

About this Topic