WPIntell

Source evidence

Get the source_url of featured image

Better REST API Featured Images · support · 2018-02-20T20:06:00+00:00

complaintsentiment
mediumseverity
0.87relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 26 rows with source links

15.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
aureliendebord unresolved
Hello, I have install the plugin and I get the “better_featured_image” object. I try to render on my JS front using “item.better_featured_image.source_url” in my request, but this does not return me the wished url. I get this error : Uncaught (in promise) TypeError: Cannot read property ‘source_url’ of null getReferences() { return new Promise((resolve, reject) => { request.defaults.baseURL = this.baseUrl; request.get('posts?categories=46&per_page=6').then(response => { const data = [...response.data]; if (response.status === 200 && response.data.length > 0) { const filtered = { total: response.headers["x-wp-total"], totalPages: response.headers["x-wp-totalpages"], data: data.map(item => ({ id: item.id, title: item.title.rendered, content: item.content.rendered, excerpt: item.excerpt.rendered, slug: item.slug, image: item.better_featured_image.source_url })) }; resolve(filtered); } else { reject(response); } }); }); }, This topic was modified 8 years, 3 months ago by aureliendebord . This topic was modified 8 years, 3 months ago by aureliendebord .

Comments

0 shown

No comments were stored for this source.