This happened to me on a very high traffic website and I didn’t have the option to troubleshoot things by disabling plugins.
I deleted the relationship field, recreated it with the same name and the search started working again.
P.S. I use a plugin called “Custom Post Types UI” and I think the relationship field search broke after I created a new custom post type.
One last thing. How would I “trigger” all the posts to be updated? Because otherwise I’ll have to physically press update on every post, whether it be on the front-end or the backend.
Turns out I was referencing the wrong template. My acf_form() did have the correct arguments.
I solved the problem by using field keys instead of field names and adding $post_id to the update_field function.
E.g. update_field(‘field_55760114e5887’, $per_week, $post_id);
Thanks a lot for helping me troubleshoot the problem though!
It doesn’t have any arguments.
I made the updates. But the problem still remains. I forgot to mention, this form is a front end form. Do you think that has something to do with it?
I noticed that fields update like they should when I create a post in wordpress backend. Could that be the issue?
The strange thing is that my title gets created whenever the post is published, but the calculations don’t get populated. I might be missing something in the code.
Hi John,
I mean I want the fields to be populated when the post is first published.
With the acf/save_post action I have to physically press the save/update button in the published post for the calculated values to be added to the custom fields.
Hahah happens to the best of us! Good luck with your project!
Don’t think you need a function. Just do it like this in your template file:
<?php if( get_field('county') ) { ?>
<?php echo get_field('county') . ' County' ; ?>
<?php } ?>
Are you having trouble creating the pedigrees taxonomy?
If so, you can create it manually using code in the theme’s functions.php file: http://www.smashingmagazine.com/2012/01/04/create-custom-taxonomies-wordpress/
Or use a plugin like Custom Post Type UI: https://wordpress.org/plugins/custom-post-type-ui/
I use the second method as it allows me to quickly create taxonomies and link them to posts, custom post types or both.
Hi Christian,
Just wondering, are you trying to build something like a mega menu?
Seems like the simplest way to achieve this would be to create a CPT for the custom links as well and then using the relationship field in the two places.
And then you can make it easier for people to search+select the links in the relationship field by assigning taxonomy terms to them if that’s possible.
I’ve been using wpallimport for a while, and it works well. But this site is going to be used by multiple people who aren’t very tech savvy, and I want them to be able to do everything from the post edit screen itself and in the front end version of the form.
I’ve figured out how to populate a repeater field with data when you hit the save/publish button. But I want to understand a couple of things:
If you could direct me to any resources/posts that tackle any of the above problems, that would be very helpful.
I will be happy to post the solution in this forum once i’ve figured out the whole thing.
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.