# Adding the wp-id parameter to topics created through WordPress

**URL:** <https://meta.discourse.org/t/adding-the-wp-id-parameter-to-topics-created-through-wordpress/64630>\
**Category:** Development\
**Tags:** wordpress\
**Created:** [16. Juni 2017 um 18:30 UTC](https://meta.discourse.org/t/adding-the-wp-id-parameter-to-topics-created-through-wordpress/64630 "2017-06-16T18:30:25Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [16. Juni 2017 um 18:30 UTC](https://meta.discourse.org/t/adding-the-wp-id-parameter-to-topics-created-through-wordpress/64630/1 "2017-06-16T18:30:25Z")

</div>

When a new topic is created through the [WP Discourse](https://github.com/discourse/wp-discourse) plugin, the plugin is sending a `wp-id` (with a hyphen) parameter to Discourse. It’s been doing this since before I started working on the plugin. It doesn’t seem that it’s used anywhere in Discourse.

Having a `wp_id` property for topics that are created through WordPress would be useful for syncing updated content between Discourse and WordPress. The way I’m doing this at the moment is to make a request to a Discourse route that’s been added through a plugin. The request is returning the `topic_id`, `title`, and `posts_count` for all topics that have a `topic_embed` that have been updated within a given time range.

On the WordPress end, the difficulty is matching the returned data with the WordPress post. It can be done with the data that’s being returned, but its a somewhat expensive query. If a `wp_id` property was added to topics that were created through WordPress, the process would be more efficient.

Would it be possible for this to be added to Discourse?

---

_[View the full topic](https://meta.discourse.org/t/adding-the-wp-id-parameter-to-topics-created-through-wordpress/64630)._
