Seems to be fixed as of ACF 5.3.7!
Same issue, any feedback?
Been fiddling with this, and it looks promising, but there is one major issues that I have found.
If you are for example setting up the 3 rows flexible content row, you will add 3 new flexible content inside (one for each column)
Now, after you add blocks to each column, it’s possible to drag them up and down inside their own column (ie their own flexible content field). But in a real drag and drop scenario we would want to move every block anywhere – even between columns.
See this gif that illustrates the problem:
The question is, would this even be possible to do with ACF?
Hey again!
@atomicsmash would you mind rehosting the JSON file of the layout? I can’t find it anywhere here on the forum..
Thanks!
Excellent stuff! Thanks AtomicShash, really been looking for something like this!
This replacement is great, but I need one for post ID also, not URL.
This is because my custom post type don’t have own URL, only URL parameter (like /dashboard/<CPT-ID> )
But its also much more versatile because people can do anything they want with the ID.
So please can you add also:
$form['return'] = str_replace('%post_id%', $form['post_id'], $form['return']);
To allow the Options page to be shown in Network Admin we need to add it through another hook.
Options plugin version 1.2.0, line 45:
Before:
add_action('admin_menu', array($this,'admin_menu'), 11, 0);
After
add_action('admin_menu', array($this,'admin_menu'), 11, 0);
add_action('network_admin_menu', array($this,'admin_menu'), 11, 0);
$blog_id resolves to 1 in network admin so all settings will be saved to the first blog. (Usually the network site.)
Would really appreciate if this could be patched in the next version. This is very useful for multisites.
Well that turned out to be fairly easy. Here’s the code, hope it helps someone:
To get items that have a date set in the future, make this WP_Query, where event_start_date is your custom field.
$meta_query = array(
array(
'key' => 'event_start_date',
'value' => date('Ymd'),
'type' => 'DATE',
'compare' => '>='
)
);
$args = array(
'post_type' => 'post',
'posts_per_page' => $posts_per_page,
'order' => 'DESC',
'orderby' => 'meta_value_num',
'meta_key' => 'event_start_date',
'offset' => (max(1, get_query_var('paged')) - 1) * $posts_per_page,
'meta_query' => $meta_query
);
Where are you adding this code? If it is in a plugin, please try hooking on plugins_loaded and do it there.
http://codex.wordpress.org/Plugin_API/Action_Reference/plugins_loaded
If you are in a theme, try hooking on init instead.
Hi Elliot,
We have used another workaround (Showing a widget with fields the user can edit after they have registered.) We’re gonna stay on ACF 4 for a while, but I hope someone else can try this out.
Hi @elliot,
I guess the question then is why our installs are only searching in the post_title. Both me and Fade seem to have this problem. Any ideas?
Hi @elliot,
I think the default WP_Query behaviour is to search both post_title and post_content, so I am surprised this is not working in the Relationship field.
Assuming this was a choice made by you, is there any suitable hook in ACF to override this? (Such as a filter in Relationship field.)
Or do you think there is a WP core hook?
So you reorder the field groups??
Even if that is a solution, I hope elliot can make the field groups render in the order they are added to the field_groups array.
Even when I remove acf_form_head, the ACF processing is triggered.
I would very much appreciate if this can be fixed in ACF 5.
Thanks.
Thanks Elliot.
How do I stop ACF from saving the form data?
For example, when I passed $post_id => ‘new’ to acf_form(), an entry was created in the wp_options table with the key new…
So can you tell me how to stop ACF from processing the form data? I think ACF is picking up the “acf_nonce” POST value, which triggers the form processing.
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.