admin管理员组文章数量:1279015
Is it possible to create a CPT in another CTP?
I would like to make a CPT called "magazine" which will have title, description, image, categories etc. Each "magazine" will have several CPT "articles" which will have their own fields like description, title etc.
I would like that adding new "articles" would be done only on the edit page of the "magazine" and they would be assigned only to that "magazine"
Unless someone has a better idea to solve this.
EDIT:
I am trying to create something similar to what is on this site. /journals
There is a category eJurnals, which has its own archive where the individual jurnals are displayed
When entering a single jurnal, it has a picture and some additional fields and a list of volumes and issues
Going further by clicking on a single issue we again have a separate page with the data for that single issue and a listed number of articles.
Clicking on an article takes us to the single article page, and there we have the author(s), a description and a document to download.
- Jurnals - i thing as Taxonomy
-
- Jurnal - ?
-
-
- issues - ?
-
-
-
-
- article as CPT
-
-
Apart from displaying on forntend it is also important how to easily add these jurnals, issues and articles in dashbord
Thank you for your reply
Is it possible to create a CPT in another CTP?
I would like to make a CPT called "magazine" which will have title, description, image, categories etc. Each "magazine" will have several CPT "articles" which will have their own fields like description, title etc.
I would like that adding new "articles" would be done only on the edit page of the "magazine" and they would be assigned only to that "magazine"
Unless someone has a better idea to solve this.
EDIT:
I am trying to create something similar to what is on this site. https://elibrary.narr.digital/journals
There is a category eJurnals, which has its own archive where the individual jurnals are displayed
When entering a single jurnal, it has a picture and some additional fields and a list of volumes and issues
Going further by clicking on a single issue we again have a separate page with the data for that single issue and a listed number of articles.
Clicking on an article takes us to the single article page, and there we have the author(s), a description and a document to download.
- Jurnals - i thing as Taxonomy
-
- Jurnal - ?
-
-
- issues - ?
-
-
-
-
- article as CPT
-
-
Apart from displaying on forntend it is also important how to easily add these jurnals, issues and articles in dashbord
Thank you for your reply
Share Improve this question edited Oct 27, 2021 at 16:35 Czechu92 asked Oct 27, 2021 at 14:24 Czechu92Czechu92 33 bronze badges 2 |1 Answer
Reset to default 0Unfortunately it is impossible and here is no perfect solution.
If you need to edit related "articles" on the same page in the backend you can try to use ACF repeater field https://www.advancedcustomfields/resources/repeater/ but it is not the best idea because it can be a problem to show all articles on fronend.
I think the best will be to create one additional custom post type "articles" and make relation with "magazine" using ACF post Object field https://www.advancedcustomfields/resources/post-object/ but it will not allows you to edit articles on the Magazine page in the backend.
本文标签: Create custom post type inside other post type
版权声明:本文标题:Create custom post type inside other post type 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741248908a2365421.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
archive-post_type.php
. There will be no Magazine posts, right? The only posts created are articles organized under a Magazine label on the front end. – jdm2112 Commented Oct 27, 2021 at 14:59