# שגיאת פרסום ב-WP-Discourse

**URL:** https://meta.discourse.org/t/publish-error-on-wp-discourse/197414
**Category:** WordPress
**Created:** [16 ביולי,‏ 2021,‏ 10:08pm UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414 "2021-07-16T22:08:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [16 ביולי,‏ 2021,‏ 10:08pm UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/1 "2021-07-16T22:08:14Z")

</div>

Hi!

For some reason, WP featured image won’t be published anymore on the Discourse posts.  
I have a featured\_link.post\_error that returns a 403 error.

Here’s full error message in WP-Discourse:

```plaintext
[2021-07-16 22:02:50] publish.ERROR: featured_link.post_error {"wp_title":"Roule Ton Unifest' (Métabief, Jura)","wp_author_id":"17","wp_post_id":159075,"discourse_post_id":"203291","response_message":"Forbidden","http_code":403} 

```

Any idea how I can fix this?

---

<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: [17 ביולי,‏ 2021,‏ 2:05am UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/2 "2021-07-17T02:05:17Z")

</div>

Hey @Canapin,

> [@Canapin](#):
>
> WP featured image won’t be published anymore on the Discourse posts  
> …  
> I have a featured\_link.post\_error that returns a 403 error.

The featured image in Wordpress and the featured link in Discourse are different things.

The featured link is a link that’s applied to Discourse topics, which appears below the topic title in a topic, and next to the title in a topic list. You can set the featured link in posts published from Wordpress using the `Add Featured Links` publishing setting. To see this working on the latest code of both [WP Discourse](https://github.com/discourse/wp-discourse) and Discourse, see

[https://try.thepavilion.io/t/repeating-mistakes-why-the-plan-to-protect-the-world-s-wildlife-falls-short/987](https://try.thepavilion.io/t/repeating-mistakes-why-the-plan-to-protect-the-world-s-wildlife-falls-short/987)

You can add the featured image of a Wordpress post to the full text of a post published on Discourse following the steps outlined here.

> [@Customize the structure of WP Discourse templates](https://meta.discourse.org/t/wp-discourse-template-customization/50754#add-the-featured_image-to-the-publish-template-6):
>
> The [WP Discourse](https://github.com/discourse/wp-discourse) plugin uses HTML templates to add markup to Discourse comments for publishing on WordPress and to WordPress posts for publishing on Discourse. The text content of these templates can be customized on the plugin’s options page. To change the structure of a templates requires you to add a function to your theme’s functions.php file This #howto will explain how to do that. The templates In the plugin’s code, the templates are static functions that return a mixture of html and templ…

#### Your log error

It looks like the error you’re getting there for the featured link request is an authorisation error. The code `403` and the message “Forbidden” (which comes from Discourse itself, not [WP Discourse](https://github.com/discourse/wp-discourse)) is telling us that the user who you’ve set in your [WP Discourse](https://github.com/discourse/wp-discourse) connection settings doesn’t have permission to use the Topic update endpoint (which is used to update a topic to add the featured link).

I would first try refreshing the API token (set it as a “Global Key” when you generate it in Discourse) you’re using in [WP Discourse](https://github.com/discourse/wp-discourse).

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [17 ביולי,‏ 2021,‏ 11:33am UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/3 "2021-07-17T11:33:53Z")

</div>

Thanks for the detailed answer and the [WP Discourse](https://github.com/discourse/wp-discourse) template customization link, I used some code from here and now featured images work again, among other things that were also broken. Everything was working well less than a week ago so I guess my code was incompatible with a recent update of [WP Discourse](https://github.com/discourse/wp-discourse) or something like that.

However, there’s still the _featured link_ error in [WP Discourse](https://github.com/discourse/wp-discourse) logs though posts are correctly updated. 🤔  
Despite this logged error, everything seems to be working fine.
