How to maintain wordpress hierarchy of posts different post_type using post_parent?

I’m now developing a Shop using wordpress 4.2.

Now, I’m planning to define the Shop Entity and Goods Entity to two different post_types.

    // ...
    register_post_type('shop', $args);
    register_post_type('goods', $args);

So, many goods relate to one shop.

I’m wondering if I can make the post_parent of a goods post to be a shop post.

And I want it shown in the admin panel.

My Question:

  1. Is it possible to set post_parent to a different post_type?
  2. Can I specify the post_parent type of goods to be a shop?
  3. Can I select the parent of a ‘goods’ edit page in the admin panel?

Hope for you help, thank you.

Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.