I am trying to display a parent post logo on a child post. The post relationship is set up but the post relationship field is empty. The child post hasn't been assigned to a parent post.
I am trying to set up a site with farms and products. Each farm has multiple products in different categories and subcategories. Each product has one farm. When you click on a farm page it should show products by categories and subcategories. When you click a product category or subcategory it shows each farm that has that product.
I tried setting up two custom post types with a parent/child relationship with farms as the parent. The relationship is set but the post relationship field is blank. When I set up a layout for products and inserted a post link for the parent post it just displays the post link of the product again.
Dear Miles,
I assume we are talking about the problem:
the parent/child post relationship settings lost after you save the parent post
If it is, the problem you mentioned above is abnormal, I suggest you check these:
1) You are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) Follow our document to setup the parent/child post types relationships:
https://toolset.com/documentation/user-guides/creating-post-type-relationships/
3) In case there is any compatibility problem in your website, please try this:
deactivate other plugins and switch to wordpress default theme, and test again
I am using the latest versions. I followed the user guide. I attached a screenshot. It shows the parent page post relationship section with nothing in it. I thought the child posts would be visible here. The child posts also don't display the parent in the post relationship section. It says that the post types are connected but the field is empty.
Do I manually have to set the parent in the post relationship metabox on the child pages to be able to display an image from the parent's custom field on the child post?
I am using All import to import 700 products (children post type) of 60 businesses (parent post type). Is there a way to automatically assign the correct parent business to each product?
Q1) Do I manually have to set the parent in the post relationship metabox on the child pages to be able to display an image from the parent's custom field on the child post?
You can edit each child post, in section post relationship metabox, setup it's parent post type, relate it to existed parent posts.
Q2) Is there a way to automatically assign the correct parent business to each product?
Types is using a custom field "_wpcf_belongs_{parent-slug}_id" to store the parent post ID, for example, the parent post type is using slug "house", then there is a custom field "_wpcf_belongs_house_id" in each child post, the field value is parent "house" post ID, you will need to manually setup the "_wpcf_belongs_house_id" field for each child post.