0

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

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
    Oct 27, 2021 at 14:59
  • @jdm2112 thank you for your reply. I have added more information to my question
    – Czechu92
    Oct 27, 2021 at 16:56

1 Answer 1

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.com/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.com/resources/post-object/ but it will not allows you to edit articles on the Magazine page in the backend.

1
  • Another option along this line would be to create a custom taxonomy for your "articles" post type, with terms that match the "magazine" post type's slugs, and associate them that way.
    – StudioAl
    Oct 31, 2021 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.