# 如何按分类为主题添加自定义字段

**URL:** <https://meta.discourse.org/t/how-to-add-custom-field-on-topics-by-category/94228>\
**Category:** Development\
**Created:** [2018年八月8日 18:13 UTC](https://meta.discourse.org/t/how-to-add-custom-field-on-topics-by-category/94228 "2018-08-08T18:13:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Menzer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/menzer/32/119682_2.png) [@Menzer](https://meta.discourse.org/u/Menzer)\
**Post date:** [2018年八月8日 18:13 UTC](https://meta.discourse.org/t/how-to-add-custom-field-on-topics-by-category/94228/1 "2018-08-08T18:13:31Z")

</div>

I would like to understand how to create a custom field for topics depending on category (I’d like to be able to select which categories this Custom Field will be visible.

Ideally I would like 2 custom fields

1 Text field  
1 image upload field

The custom fields should display on the layout sidebar display box,

However i’d like text field value ( added when creating a topic and will be a URL link to an MP3 file) to display a player to play the MP3 file

The image custom field upload will just be a logo to display above the Text field

If anyone can help point me in the right direction I would be grateful
