Works great, even when you slide to the next/previous slides. Thanks.
The repeater needs a pagination please.
I have the same problem. In the backends, im ending up having too much lines row one page.
A pagination is required for me.
I have the exact same problem as the title. Still searching, will keep this post updated if I find something.
Found the solution here:
http://support.advancedcustomfields.com/forums/topic/relationship-post-children-filter/
I have the same problem with a client deleting his pictures in the media library.
ACF should allow a delete even if no picture is selected. That would solve it.
I had to do it manually.
I query the database and look for a rules for a specific post. If I found one, I grad the ID.
It works, but it’s not pretty:
//We look into the rules to see if any are applied
$rows = $wpdb->get_results(“SELECT * FROM wp_postmeta WHERE meta_key = ‘rule'”);
foreach ($rows as $row) {
$values = unserialize($row->meta_value);
if ($postid == $values[“value”]) { $numberofacffield = $row->post_id; }
}
//Here, we read the fields since $numberofacffield is the ID we are looking for.
$custom_field_keys = get_post_custom_keys($numberofacffield);
This is what I did. Thanks.
//Upload la photo dans le dossier
require_once(ABSPATH.’wp-admin/includes/file.php’);
$uploadedfile = $_FILES[‘photo’];
$movefile = wp_handle_upload($uploadedfile, array(‘test_form’ => false));
//On sauvegarde la photo dans le média library
if ($movefile) {
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’].’/’.basename($movefile[‘file’]),
‘post_mime_type’ => $movefile[‘type’],
‘post_title’ => preg_replace(‘/\.[^.]+$/’, ”, basename($movefile[‘file’])),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment($attachment, $movefile[‘file’]);
update_field(‘photo’, $attach_id, ‘user_’.$current_user->ID);
}
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.