Support

Account

Home Forums Backend Issues (wp-admin) Can I use a different custom field group on specific categories?

Helping

Can I use a different custom field group on specific categories?

  • I’m having a bit of trouble with getting a desired result…I’m sure there’s a way to do what I need.

    I have a site with a products section that’s 3 layers deep…eg: Fruit -> Apples -> apple. I’d like to have some custom fields on fruit such as Title and description, and different fields on Apples such as Title and Image. These would be displayed at different levels in the user journey.

    How I usually do this is to have pages that correspond to the categories and have the custom fields on those, but it seems stupid to duplicate the categories as pages just to get a few bit’s of content into a template.

    I am using a custom post type and custom taxonomy for the products if that makes a difference?

    This must be pretty common so I’m wondering how other people do this, or whether there are resources (that I haven’t been able to find) that use a similar layout.

    Thanks for taking the time to read this.

  • Hi @jordan-neenan,

    Thanks for the post.

    To get the fields to appear on the category posts, you will only need to define different field groups for each of your categories.

    You can then map the field group to the category by using the location rule:

    Show field group if post category == "Fruit"

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Can I use a different custom field group on specific categories?’ is closed to new replies.