FakerPress seemed to work just fine using the normal field name actually. Without any need to manually save the post. So maybe something changed on one side or the other and there’s not really a problem anymore.
Hey @hube2 – Did you ever figure out a workaround for using FakerPress with ACF fields? I’m running into the same problem this morning.
Your issue was here
Yep, you’re right. Fixed that and it works perfectly with the key. Thanks again! 🙂
Nevermind. It worked perfectly. But you definitely have to use the field name, not the field ID. I thought the latter would work better since the field was nested in a repeater. Nope. 🙂
Thanks again.
Thanks John! This looks perfect. I’ll give it a try first thing tomorrow.
It was in the footer in both cases?
I didn’t notice any performance issues or a flash of unstyled html, but it probably depends on what your JS is doing. Mine was for a slider, and I believe I had all the slides but the first hidden via CSS until the script was fully loaded. So you may have to do something like that, style the element for before the script loads, then for after. Many scripts will add a class to the relevant element once the script is loaded, making it pretty easy to manage.
Did anyone ever figure out what was going on with this issue? I have a client with Bluehost and I’m getting a similar error:
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
I get in an options panel for a url field. Oddly enough, other url fields within that panel update just fine. But the three on this tab do not.
@lstreng – this is how I did it:
<?php // Loop through the repeater rows
if (have_rows('info_block')) :
wp_enqueue_script('slick-home'); // js triggers for slider
while ( have_rows('info_block') ) : the_row();
Thanks for both those solutions John! It didn’t even occur to me that I could enqueue the script from within the loop itself.
Thanks! I’m going to give your plugin a try.
I thought it might be something like that. Since I have two different fields (same field names but different keys) I’ll have to use something like this, yes? https://github.com/Hube2/acf-filters-and-functions/blob/master/acf-reciprocal-relationship.php
But if the field is has the same key on both sides, I can use the the normal snipped (https://www.advancedcustomfields.com/resources/bidirectional-relationships/) but just change acf/update_value/name=related_posts
to acf/update_value/key=field_cba9876543210
?
I figured it out. Plugins load in alphabetical order. My plugin had “45” in its name, so it was loading before ACF. I renamed it “Forty-five” and problem solved.
More info here: https://wordpress.org/support/topic/how-to-change-plugins-load-order?replies=11#post-1385859
Update: the relationship field seems to show posts no matter what their post_status is. Even drafts show up in the loop (on the published page). Is there a way to filter out everything except for published posts?
You’re right. I saw that in another post as you were replying. Thanks!
Actually, the solution is right over here: http://support.advancedcustomfields.com/forums/topic/reverse-query-relationship-subfield-which-is-nested-in-a-repeater-field/
I should have googled better before posting. 🙂
That still returns empty. I don’t think there’s an “issue” variable anywhere.
So that the galleries can be inserted in various locations within the_content.
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.