@James, I stated at first on locally works just fine. No error, no warning, no nothing.
The server admin made it work though; I’m waiting for his reply and know what was going on.
And what if it doesn’t work? 🙂
I just tried to test it on a freshly installed WP & ACF, fields not saving.
I’m somehow 99% that’s a server issue, but i have no idea where to look at. Any hints?
Right, but this shouldn’t be present on both my machine and production? I mean is the exactly same DB & files.
I’ll try to force the upgrade though, maybe this will help.
Thanks!
Hmm, you’re right. But if you’re using load_field hook instead of prepare_field, it works:
add_filter('acf/load_field', 'acf_admin_only_prepare_field');
Maybe it’s a good idea to post some of your code? 🙂
You might doing it wrong. See here how you can set your custom settings:
acf.add_filter('date_picker_args', function( args, $field ){
if($field.attr('data-key') == 'field_58235f2750d77') { // you might want to tweak this field key to match your key
args.minDate = -2;
}
return args;
});
1. If select_the_value
is a true/false field, it will already return true/false, so if(get_field('select_the_value'))
should be enough.
2. If select_the_value
is another kind of field (e.g. checkbox or select), 'TRUE'
must be defined as a field option (ergo be a string), otherwise it won’t match
In other words, this might work like this:
$fieldName = get_field('select_the_value') ? 'select_the_country' : 'select_the_city';
the_field($fieldName, $queried_object);
The issue here is that the ID’s are pointing to the english images, not the translated language images.This is due to missing logic between ACF and WPML.
Here is the missing logic: https://github.com/iamntz/acf-gallery-wpml-fix
Hey guys, I created a fix for this. You can install it as a plugin from here:
https://github.com/iamntz/acf-gallery-wpml-fix
Indeed, 154eaaf135a20a9ad65c8352b42cccc386e1213c is the latest revision where this used to work.
Probably it’s a temporary issue?
There is a small issue with the trigger
though: page will be dirty every time. I.e. ACF will detect that the page had changed even if it didn’t 🙂
Hopefully @Elliot will suggest a better approach 🙂
I was not aware of an existence of this kind of addon, but i bet it should be fairly straightforward to build one. That guide looks good though, but instead of custom options you just get taxonomy terms 🙂
@james, i believe it’s a UX thing, something that will improve the site administration experience, rather than he actually need that hierarchy.
@aaronrobb: you could try to make a custom field that is a chain selector. You only display one select by default – the parent terms – then, on every change you load children for that term.
A little update: as crazy at it may looks, i stopped to have issues as soon i disabled Simple Custom Post Order plugin!
Still investigating and updating if i find something else.
Alright guys, so i have a little thing i found and i think it’s an issue with some wpml settings (this is probably why @elliot can’t replicate), but i’m still trying to figure which one.
So, on gallery.php, on format_value method, $value variable contains correct IDs:
Array ( [0] => 245 [1] => 243 [2] => 241 [3] => 239 [4] => 237 [5] => 235 )
However!
// find attachments (DISTINCT POSTS)
$attachments = get_posts(array(
'post__in' => $value,
....
));
Is returning completelly different ids, disregarding post__in option: 235, 237 and so on. Then, when trying to apply the custom ordering, each key is not found (obviously!). This is always happening, no matter how suppress_filters is set.
Still digin, maybe i find something more. Just wanted to add an update here, maybe someone have a better idea 🙂
( also i decided to close this, since is a duplicate: http://support.advancedcustomfields.com/forums/topic/acf-gallery-vs-wpml/ )
Thanks @elliot. The way you propose makes impossible the use of tabs. And my OCD (which has it’s own personality! 😀 ) insists to have everything organized (having N metaboxes is anything but organized)
Anyhow, thanks for your time, please consider adding this feature. Thanks!
A better example:
http://img.iamntz.com/jing/2014-02-01-08@08h36_56.png
I want to add few options related to how pages looks in two ways: one global and one local. So you can have a default page background which can be overwritten per page.
Things are working great, is just that i’d like to have it displayed as a sidebar widget on page or as a regular metabox on options page.
Yeah, but i was hoped to have an easy way to reuse these fields on multiple filed groups:
http://img.iamntz.com/jing/2014-01-30-15@15h24_4.png
Without using endless conditional logic 🙂
@Andy: yes, that would go into functions.php
. I’m not sure if it’s a good idea to remove title completely, at least not with my method.
You could add a save hook that updates the title based on the field, but i think it would be a bit of an overkill.
Andy, I converted the method into a standalone function (it was used in a bigger class).
You can use it by simply calling get_acf_title( get_the_ID() )
On ACF admin you add a metabox with title
field (which is set as a text field).
Here is a quick view of the admin part:
http://img.iamntz.com/jing/2014-01-30-15@15h24_4.png
ACF v5 pro
Should we understand there will be a lite and a pro version? One free and one.. not that free?
Any ETA for v5?
@andycheeseman: i’m using this method:
function get_acf_title( $post_id ){
$title = get_field( 'title', $post_id );
if( empty( $title ) ){
$title = get_the_title( $post_id );
}
if( $title == '-' ){
$title = '';
}
return apply_filters( 'the_title', $title );
}
(Also contain the ability to leave the title completely blank)
@yummytummy: Hi! I’m the author of that utility. Please see my comment here: https://github.com/iamntz/acf-recovery/issues/1
Thanks!
Great, thanks!
Unfortunately, i’m under a very tight deadline and can’t start fiddling, probably next month i’ll have some spare time.
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.