Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1290050
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 years ago.
Improve this questionWe have a WordPress instance that we query through it's API. Contents are posts
, or episodes
from a Podlove plug-in. We have four podcasts, though at the moment only one is set up in Podlove. We indicate the podcast an episode belongs to by adding a category.
Now we'd like to add a logo to each podcast series. We are considering two solutions:
- We could set up all podcasts in Podlove (which probably should have been done from the beginning). But as far as we know, there's wouldn't be a clean way to read it using the API.
- We could use the categories. At the moment we have four categories that we only use for the podcasts as well as a parent podcast category. But our first experiments with this plug-in also indicated that the category image is not included in the API and we couldn't find any plug-in that seems to be intended to be used with a headless Wordpress installation.
What would be the simplest or most standard solution for us to get a logo for each podcast?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 years ago.
Improve this questionWe have a WordPress instance that we query through it's API. Contents are posts
, or episodes
from a Podlove plug-in. We have four podcasts, though at the moment only one is set up in Podlove. We indicate the podcast an episode belongs to by adding a category.
Now we'd like to add a logo to each podcast series. We are considering two solutions:
- We could set up all podcasts in Podlove (which probably should have been done from the beginning). But as far as we know, there's wouldn't be a clean way to read it using the API.
- We could use the categories. At the moment we have four categories that we only use for the podcasts as well as a parent podcast category. But our first experiments with this plug-in also indicated that the category image is not included in the API and we couldn't find any plug-in that seems to be intended to be used with a headless Wordpress installation.
What would be the simplest or most standard solution for us to get a logo for each podcast?
Share Improve this question asked Jun 22, 2021 at 7:35 PidaPida 1034 bronze badges 2 |1 Answer
Reset to default 2I think it would be prudent to create a new custom taxonomy now named podcast
in order to categorize your episode
s separate from other content.
Whether using a custom podcast
taxonomy or generic category
s, taxonomies do not support attached media or featured images out of the box. You'll likely need to store a media attachment ID for the image in taxonomy meta-data, and either expose that meta to the REST API using register_meta()
or add it as a field to the relevant response using register_rest_field()
.
If podcast logos are some feature supported by the Podlove plugin/service, then you will need to consult their official support channels for how you should retrieve it via API.
本文标签: categoriesAdd image to each podcast series (or category) in headless WordPress instance
版权声明:本文标题:categories - Add image to each podcast series (or category) in headless WordPress instance 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741490618a2381603.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
register_rest_field()
. – Pida Commented Jun 24, 2021 at 9:48