如何在 WordPress 中处理 has_many ? (唱片目录 -> 歌曲 -> 每首歌曲 5 个网址)

发布于 2024-12-19 21:46:03 字数 319 浏览 4 评论 0原文

我正在为一个乐队编写一个 wordpress,在他们的唱片页面上他们想要以下内容:

  1. 专辑封面图片
  2. 标题
  3. 发行日期
  4. 大约 10 首歌曲的列表,他们可以点击播放...

然后每首歌曲旁边需要有 5 首不同的图标(视频、歌词、播放、亚马逊链接、itunes 链接)。

起初我打算使用自定义帖子类型,但考虑到这只是一维数据,我不知道该怎么做,因为他们必须为每个专辑添加 10 首歌曲,然后是与每首歌曲关联的 5 个网址。

我如何使用自定义帖子类型来做到这一点?或者有一个插件可以提供帮助吗?

I'm coding a wordpress for a band and on their discography page they want the following:

  1. Album cover image
  2. Title
  3. Release date
  4. List of 10 or so songs that they can click to play...

Then next to EACH song needs to be 5 different icons (video, lyrics, play, amazon link, itunes link).

At first I was going to use a custom post type, but considering that's only 1 dimension of data i dont know what to do, as they have to add like 10 songs for each album, and then the 5 urls associated with each song.

How might i do this with custom post types? or is there a plugin that could help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红衣飘飘貌似仙 2024-12-26 21:46:03

对于类似的内容,请查看自定义字段 (http://codex.wordpress.org/Custom_Fields)。

这个插件会有所帮助
http://wordpress.org/extend/plugins/custom-field-template/

虽然可以(但需要解释很多)自己编写代码。上述插件将为您做很多事情。

For something like that, look into Custom Fields (http://codex.wordpress.org/Custom_Fields).

This plugin would help
http://wordpress.org/extend/plugins/custom-field-template/

Though it is possible (but a lot to explain) to code them yourself. The aforementioned plugin will do a lot of that for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文