# Map WP Custom Fields to Discourse Custom Fields (in topic view)

**URL:** https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966
**Category:** WordPress
**Created:** [April 29, 2024, 5:41pm UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966 "2024-04-29T17:41:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [April 29, 2024, 5:41pm UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/1 "2024-04-29T17:41:02Z")

</div>

We are planning to establish a product database on wordpress via custom post types. and import those posts to discourse wia [WP Discourse](https://github.com/discourse/wp-discourse) plugin.

Since each wp product page will have several custom fields, we would like to map them to discourse custom fields for each corresponding topic. How could that be achieved?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 30, 2024, 8:39am UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/2 "2024-04-30T08:39:51Z")

</div>

Hey @jrgong, how many products are in the database?

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [April 30, 2024, 11:15am UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/3 "2024-04-30T11:15:33Z")

</div>

We will roll out slowly with 10-20 Test products and eventually it will be approx 500-1000.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 30, 2024, 1:09pm UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/4 "2024-04-30T13:09:42Z")

</div>

You should handle this via a proper migration on the server.

I wouldn’t use [WP Discourse](https://github.com/discourse/wp-discourse), or the Custom Wizard Plugin for this (which I know is also in the mix here). Any mixture of those solutions is going to be more trouble than it’s worth for a bulk operation like this, particularly one involving custom fields. You will spend more time and effort for a worse result trying to use the plugins for this.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [April 30, 2024, 1:12pm UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/5 "2024-04-30T13:12:13Z")

</div>

Thx for the input, really appreciate it! Then we will K.I.S.S. instead and rather add WP Custom Fields to the [WP Discourse](https://github.com/discourse/wp-discourse) post template 👍

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 30, 2024, 1:12pm UTC](https://meta.discourse.org/t/map-wp-custom-fields-to-discourse-custom-fields-in-topic-view/305966/6 "2024-05-30T13:12:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
