1

it was a long title :( I need your help. Ionic application development. With the following codes, I can display single images in Articles. But I want to view multiple pictures. My codes are as follows;

Wordpress Url: http://trailerapp.site/wp-json/wp/v2/posts

WordPress-post.html ______

<wordpress-feature-media * ngIf = "post.featured_media" [id] = "post.featured_media"> </ wordpress-feature-media>

WordPress-feature-media.html _______

<img * ngIf = "media && media.media_type == 'image'" src = "

{{media.source_url}}" />

WordPress-feature-media.ts _________

    export class WordpressFeatureMedia {
@Input () id: number;

media: any;

constructor (
private wordpressService: WordpressService) {}

ngOnInit () {
if (this.id> 0) {
this.getmedi A (this.id);
}
}

getMedia (id) {
this.wordpressservice.getmedi (ID)
.subscribe (result => {
this.media = result;
});
}

}

I installed the better_featured_image plugin in Wordpress. Displayed in Json. I could not view images in the application from better_featured_image for Ionic. I'm glad you helped me. Thank you...

0 Answers0