Plugin Author
Brecht
(@brechtvds)
You’re referring to the Taxonomy Term Images feature?
The image does not get passed along but you can retrieve it using the get_term_meta function and wprmp_term_image_id meta key.
I think so,
Just want to pass the image url to the Rest API for courses.
Now you only have an id and name to work with
So you suggest to add this parame to the function?
-
This reply was modified 4 years, 10 months ago by
underdigital.
Plugin Author
Brecht
(@brechtvds)
But what are you trying to do? What is the end result?
You’ll need some custom code in any case, right?
Once you have the ID you can get the image:
https://developer.ww.wp.xz.cn/reference/functions/wp_get_attachment_image/
The end result should be on this url that i have inside each course object a variable image with the image url.
https://****/wp-json/wp/v2/wprm_course/
(Demosite Json)
-
This reply was modified 4 years, 10 months ago by
underdigital.
Plugin Author
Brecht
(@brechtvds)
Well sure, but why? What is accessing that URL?
In any case, you’ll need to use custom code to extend the API endpoint with what you need.
Making an application that connects to the RestAPI of wordpress, and using the data of the plugin to fetch some things 🙂