Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Waiting for user confirmation] Assign multiple posts to post parent

$
0
0

Great, that's not as convoluted as it first sounded and should fit my use case.

In terms off accessing the custom fields of the restaurant from within the order fulfillment would it work something like this:

Restaurants:
$child_posts = types_child_posts('order-fulfillment');
foreach ($child_posts as $child_post) {
$rest_id = wpcf_pr_post_get_belongs($child_post->ID, 'restaurant');
$rest = get_post($rest_id);
echo $rest->post_title;
echo $rest->wpcf-restaurant-phone;
echo $rest->wpcf-restaurant-email;
}

where i have custom fields for restaurants with slugs restaurant-phone & restaurant-email.


Viewing all articles
Browse latest Browse all 20145

Trending Articles