@hube2 , It’s not an example. The file you referenced is a part of plugin. I do not recommend use it as a pattern. Simple example I’ve provided here https://github.com/DenisYakimchuk/ACF-Location-Nav-Menu/wiki/Examples
I have created a little wiki on github.
The addon is already available on wordpress.org
Welcome https://wordpress.org/plugins/location-nav-menu-for-acf/
I will provide some examples on github.
@John Huebner
Menu items have the same fields and structure in db as any post type. So, data for menu items is stored with the same logic as it is done for post types. You don’t need add any special words near ID in second param of get_field / the_field functions. You can get values anywhere, just need to know menu item ID ( not “object_ID” ). But, mainly, I believe, it will be used in a Walker, for example for creating some Mega Menus.
without 3rd party plugins not possible to set filed for nav menu ?
No, ACF has no such location rule by default.
Hi! Is there any other way to update(create) repeater field out of init action? I’m making an import script for posts and I can’t use it in the init action..
I have already deleted the field and did what I want in another way. It’s very strange but problem is gone and I can’t reproduce it once again. But anyway thanks for your reply.
The same happens if I use repeater field as parent for “Flexible Cotnent”
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.