admin管理员组

文章数量:1290050

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 question

We 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 question

We 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
  • Is the problem setting and reading the image over the REST API or getting those images then added into the podcasts' RSS feeds? – Rup Commented Jun 23, 2021 at 22:21
  • This is only about reading it over the API. It seems we already found a solution using the "Categories Images" plug-in combined with register_rest_field(). – Pida Commented Jun 24, 2021 at 9:48
Add a comment  | 

1 Answer 1

Reset to default 2

I think it would be prudent to create a new custom taxonomy now named podcast in order to categorize your episodes separate from other content.

Whether using a custom podcast taxonomy or generic categorys, 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