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
  • Welcome to WPSE. What you are describing is individual posts of the Articles post type. The Magazine portion is simply the title you put on the archive 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
  • @jdm2112 thank you for your reply. I have added more information to my question – Czechu92 Commented Oct 27, 2021 at 16:56
Add a comment  | 

1 Answer 1

Reset to default 0

Unfortunately 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