I’m sorry this was not a good description.
I need the Address field(s).
In each profile page, all the correctly rendering fields; Name, Company Name, Title, email and Phone number are pulled directly from personnel post type custom fields. However, The address fields are brought in from a post_object in a Custom Post Type of Locations. In the loop that looks like:
<?php $field_name = "location";
$field = get_field_object($field_name);
echo $field['label']; ?>:</h5>
<?php $post_object = get_field('location');
if( $post_object ):
// override $post
$post = $post_object;
setup_postdata( $post ); ?>
<p><?php the_field('street_address'); ?><br>
<?php the_field('suite_office'); ?><br>
<?php the_field('city'); ?>, <?php the_field('state'); ?><?php the_field('zip_code'); ?>
I having trouble getting ; street_address, suite_office, city and state to render in the vCard.
To be specific, I don’t know how to render the post object and related subfields into the vCard ‘echo’ statement. Does that make more sense?
Thank you Gummi! This worked well for my application! John, sorry about breaking the page!
Resolved.
Thanks John, my bad. I knew I had tagged something poorly. Moving too fast when I responded. Thanks again.
It’s been sometime since I had to consider that in a visual text editor.
gummi,
Thanks! I’ll check out your solutions for 1 & 2 today.
# 3 Clarification
I am not sure I understand your question either! Let me give more detail. 😉
To keep this simple for the client to edit, the Menu sections are individual posts:
Custom Post Type = Lunch > Posts: Appetizers, Salads, Platters, etc. This seemed the most basic editing structure for the client.
The idea being through displaying a simple archive page, Menus are built by listing the articles and their respective content.
The posts(menu sections) are composed only of the WordPress Title and a Repeater Field.
The respective repeater field in each article is named the same as the article title:
So essentially I am trying to save some code using one section block in the archive template thus insuring the menus are built dynamically, requiring no code editing in the template, by the client if they add or delete sections.
If there is not a way to custom render the Repeater Field Name in this section block of code, of course I will have to build multiple loops calling individual articles in a page template type structure.
Does that help?
Thanks again for your input!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.