I support your request.
I kept getting errors when trying to link thumbnails to full size images and I didn’t notice that full size disappeared forma array.
[Edit]: I just realized that the full img path actually corresponds to $image[‘url’]
I’m ok using this object for my needs, hope this helps.
I was helped out by this comment:
“We had to check
– “Translate” for “Fields Group” and
– “Do nothing” for “Fields””
I am working most with repeaters, and dynamically added fields. I guess these populated fields are being a little cumbersome sometimes – since there is a “dont translate”, “copy”, “translate” setting for each field generated.
Sometimes I of course wish to copy all content from the originating language – especially when repeaters are used – since the new language most often want the same structure.
I have been running some javascript in the Chromes Console. So that ALL fields-labels in “Settings for Multilingual content” easily can be set to “copy”-mode, and then revert them all to “Translate”. Since these settings for each field otherwise must be done one by one.
But it is not a optimal solution, if there only were a few custom meta-data – then it is no problem. But my sites tends to be built with repeaters, blocks, columns – and all through ACF of course (WordPress would not be cool if there were no ACF 😉
I’m relatively new to ACF and love it. But, the lack of data importing and exporting is surprising. I cannot use the product for certain projects because I cannot bring in client data.
I have a solution (or workaround) that should work, but I’m not a developer so perhaps someone reading this thread will attempt it. The workaround is simply to incorporate the use of a exact field mapping between the import set and the ACF database.
Step 1 would be to create your ACF fields and groups as desired (we’ll call this the “ACF database.”)
Step 2 would be to view a report of the ACF database structure (could be a plugin from a third party that creates this view.)
Step 3 would be to prepare the data to be imported such that it matches the ACF database structure (this is really important due to recurring fields and other relational aspects of ACF) This part is up to the WordPress administrator (i.e. you!)
Step 4 would be the import of data through a script or utility – preferably inside of WordPress ACF control panel. (Again, this could be a third party utility or plugin.) This utility should provide a report on any fields that didn’t get imported and provide an explanation (i.e. field mismatch, system error, etc.)
Step 5 would be to deal with any rejected fields due to mismatch or other issue and either correct them and retry the import or just enter manually.
Some very unique and powerful things can be done with ACF and WordPress. It’s completely changed my outlook with regard to solving client issues. But, without data importing (and exporting for that matter) I’m really limited.
You may now return to your regularly scheduled nap.

It is possible that the YARPP plugin is adding custom SQL to any DB querying which would then prevent ACF from finding the field’s settings and correctly formatting the value…
Another option is that ACF is getting confused as to which $post to load the value from. Within the template, can you test the value of get_the_ID() and check that the value is correct for each related post?

Hi @skoldin
No, ACF PRO is not the same as ACF free (v4.3.9) + 4 x add-ons.
ACF PRO is ACF5 (different from v4.3.9) + 4 x add-ons (which are also improved).
All the info is explained in the faq here: http://www.advancedcustomfields.com/pro/
Thanks
E

Hi @kraudio
It looks like the returned value is wrapped in another array. Your var_dump shows this in the first line: [0] => Array
Can you test the unformatted value:
<?php
echo '<pre>';
print_r( get_field('ac_imagem_destaque', false, false) );
echo '</pre>';
?>
Quick question. Is this function only for adding ACF data to a GET request?
I am trying to POST data from WP-API to ACF, but I’m struggling to find a way.
Many thanks
Good morning, thanks for the help
But not yet worked out, looks like the generated html
<img src = "" alt = "" class = "thumb_285_350" height = "" width = "">
What can it be?
I did try that code and its working fine on my part.
CSS
.acf-map {
width: 100%;
height: 400px;
border: 1px solid #80d3f1;
margin: 20px 0;
}
.acf-map .gmnoprint img {
max-width: none;
}
JS
`jQuery(‘.acf-map’).each(function () {
render_map($(this));
});`
HTML / PHP
`function get_location_map($loc) {
$str_ret =”;
$str_ret .='<div class=”acf-map”>’;
$str_ret .='<div class=”marker” data-lat=”‘.$loc[‘lat’].'” data-lng=”‘.$loc[‘lng’].'”></div>’;
$str_ret .='</div>’;
return $str_ret;
}`
$loc = will be your google map field.
USE FUNCTION
echo get_location_map(get_field('map'));

By default images are returned as an array.
You need to either change this to URL, or else you can pull the details from the array to get the URL, eg:
<?php
$image = get_field('ac_imagem_destaque');
if( $image):
$alt = $image['alt'];
$thumb = $image['url'];
$width = $image['width'];
$height = $image['height'];
?>
<img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" class="thumb_285_350" />
<?php endif; ?>
You can read more here – http://www.advancedcustomfields.com/resources/image/

Just tried using:
$field_key = "field_54289c0d8173b";
$field = get_field_object($field_key);
print_r($field);
Where the key is the feature_image field.
This resulted in an array output outside of the YARRP template, but in the template the variable was blank.
checking values
<?php if( get_field('ac_imagem_destaque') ): ?>
<?php print_r( get_field('ac_imagem_destaque') ); die; ?>
<?php endif; ?>
returning
(
[0] => Array
(
[ID] => 2062
[id] => 2062
[alt] =>
[title] => destaque1a1
[caption] =>
[description] =>
[mime_type] => image/jpeg
[type] => image
[url] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[width] => 285
[height] => 350
[sizes] => Array
(
[thumbnail] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1-150x150.jpg
[thumbnail-width] => 150
[thumbnail-height] => 150
[medium] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1-244x300.jpg
[medium-width] => 244
[medium-height] => 300
[large] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[large-width] => 285
[large-height] => 350
[post-thumbnail] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[post-thumbnail-width] => 285
[post-thumbnail-height] => 350
[capa_thumb] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[capa_thumb-width] => 285
[capa_thumb-height] => 350
[capa_esquerda_thumb] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1-243x298.jpg
[capa_esquerda_thumb-width] => 243
[capa_esquerda_thumb-height] => 298
[galeria_thumb] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[galeria_thumb-width] => 285
[galeria_thumb-height] => 350
[acfimage] => http://acrio.com.br/wp-content/uploads/2014/10/destaque1a1.jpg
[acfimage-width] => 285
[acfimage-height] => 350
)
)
)
I figured it out. Here is my code…
<section>
<?php
$args = array(
'orderby' => 'name',
'order' => 'ASC'
);
$categories = get_categories('child_of=39', $args);
foreach($categories as $category) { ?>
<div class="casino-games">
<?php $image_url=get_field('featured_category_image', $category); ?>
<a href="<?php get_category_link( $category->term_id ) ?>" title="<?php sprintf( __( "View all posts in %s" ), $category->name ) ?>" />
<h3><?php echo $category->name ?></h3>
<img src="<?php echo $image_url ?>" /> </a> </div>
<?php } ?>
<div class="clear"></div>
</section>
it was this part that did the trick for me…
<?php $image_url=get_field('featured_category_image', $category); ?>
Hello, this solved my problem:
<?php
if( have_rows('repeater_field_name') )
{
$field_key = "repeater_field_number";
$field = get_field_object($field_key);
foreach($field['value'] as $value)
{
if(!empty($value['repeater_subfield_name']))
{
$not_empty = true;
break;
}
}
if($not_empty == true)
{
echo '<h2>' . $field['label'] . '</h2>';
}
echo '<ul>';
while ( have_rows('repeater_field_name') )
{
the_row();
$subfield = get_sub_field('repeater_subfield_name');
if( !empty($subfield) )
{
echo '<li>' . $subfield . '</li>';
}
}
echo '</ul>';
}
?>
WAIT !!!!
1. acf_form_head() processing form after send it.
2. IF your js error block your console before sent form you have still problem.
try fix it that in your JS:
acf.o = {};
acf.screen = {};
acf.o.post_id = 0;
acf.screen.post_id = 0;
Js console should by clear now. You could work in js and create fileuploader and gallery.
Soon I’ll add code to frontend jquery uploader based on this library:
http://blueimp.github.io/jQuery-File-Upload/
Now I testing it.
Anyone who can help me with some examples??
The most important question for now is:
– just simply adjust the html and css (classes etc.) (override acf_form() ????)
How to use the acf/load_field, acf/pre_save_post and acf/save_post.
Ok, finally got it sorted…
For anyone else out there that might run into this problem here’s the solution.
Just add the following to your functions.php file.
//Include CPT In Categories Pages
function namespace_add_custom_types( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
$post_types = get_post_types( '', 'names' );
$query->set( 'post_type', $post_types);
return $query;
}
}
add_filter( 'pre_get_posts', 'namespace_add_custom_types');
So none of those solutions worked but I did find something that did. I used the following code and was able to get the image to finally show up.
<?php
$publisher_photo = get_the_author_meta('user_profile_image');
$image_src = wp_get_attachment_image_src($publisher_photo);
echo '<img class="avatar" src="'. $image_src[0] .'" />';
?>
Thank you for your help with this.

What is you change this
[acf field="featured_category_image"
to this
[acf field="featured_category_image['url']"
? 🙂
I figured out my issue, in case this helps anyone. I used the sample code found here: http://www.advancedcustomfields.com/resources/google-map/ to generate a map. I grouped more than one using tabs (which uses jQuery UI’s tabs) and initiated it like so:
$('.acf-map').each(function(){
render_map( $(this) );
});
That left me with a map in each tab. The problem was, the hidden maps (in inactive tabs) didn’t fully render (only the top left block would be showing). There is likely a better way to do this, but I stored the javascript map variable so I could use it again, then listened for tab clicks so I could redraw the map like so:
$( ".my-tabs" ).on( "tabsactivate", function( event, ui ) {
var map = jQuery.data(document.body,"map");
//resize the map
google.maps.event.trigger(map, 'resize');
//center the map
center_map( map );
});
This worked for me. I realize this isn’t an ACF “problem”, but it might be helpful to users to have it in the docs just in case they run into it.
Cheers!
Jay
Hi navid66
when the example u have given, if i do <img src="<?php echo $first_img ?>"> that again results in
<img src="">
anything i’m doing wrong?
regards!
Mathieu
The first Woocommerce issue was likely unrelated to ACF Pro.
The latter two popped up because acf_form_post::save_post() hooks onto ‘save_post’. This hook only fires if something changs on the post’s <i>main</i> fields. What this means, for example, if you change a field within an ACF metabox without changing anything else, this hook doesn’t fire. Instead, hook into ‘pre_update_post’. See this diff to solve this problem:
http://pastie.org/9617141
Here is a reference to this same problem in another plugin.
Ohhh array_merge() and array_unique(), of course. Here I am looking for WordPress / ACF functions to do the job when vanilla php functions were the answer.
Thank you so much, that solved the problem perfectly.
Problem fixed. For anyone who may run into this problem, make sure that queries are ended properly.
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.