# Using \_yoast\_wpseo\_title as the topic title

**URL:** https://meta.discourse.org/t/using-yoast-wpseo-title-as-the-topic-title/106991
**Category:** WordPress
**Created:** [19.Январь.2019 20:19:04 UTC](https://meta.discourse.org/t/using-yoast-wpseo-title-as-the-topic-title/106991 "2019-01-19T20:19:04Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [21.Январь.2019 18:42:12 UTC](https://meta.discourse.org/t/using-yoast-wpseo-title-as-the-topic-title/106991/2 "2019-01-21T18:42:12Z")

</div>

The WordPress plugin has a `wpdc_publish_format_title` filter that’s applied to the post title before it’s published to Discourse. You can use the filter like this. I’m assuming that `_yoast_wpseo_title` is saved as post metadata:

```php
add_filter( 'wpdc_publish_format_title', 'wpdc_custom_publish_format_title', 10, 2 );
function wpdc_custom_publish_format_title( $title, $post_id ) {
    //$title = get_post_meta( $post_id, '_yoast_wpseo_title', true );

    return $title;
}

```

---

_[View the full topic](https://meta.discourse.org/t/using-yoast-wpseo-title-as-the-topic-title/106991)._
