I am kind'a new to wordpress and i need some help. I am building a website that contains articles. in each article page i want to show the writer details(image name and short description).
I have built a custom post type named 'articles', now I want to choose the writer details at the article post page lets say from a meta box...

I have also created other custom post type called 'writers' and there are all the writer details. now, my question is how do I get this done? how do I show the data from writers CPT in articles CPT?

I found this tutorial but it dosent seem to be what I need. I have installed the CPT-onomies plugin and now i see a meta box with a drop down that contains all the 'witers' CPT. how do i make the data appear in the article post front end?

Any tutorial or clue will be helpfull.

  • This may be helpful. wordpress.stackexchange.com/questions/110562/… – bdtheme Feb 7 '16 at 13:39
  • A quick solution is the Posts 2 Posts plugin. – Milo Feb 7 '16 at 20:09
  • p2p plugin will work but if each post has only 1 author then you can just store writer_id post meta on each article and you'll be ok running queries. another consideration might be using users and author functionality which is already built in for you. you can create users with subscriber role for example. both have pros and cons... – Joel M Mar 22 '18 at 23:18

This doesn't solve your question to show a custom post type inside a custom post type, but why don't you use an author template? You can set up users for your writers and select that user for each post. You can even use Advance Custom Fields to add custom fields to a users profile.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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