Can someone provide some examples how they use this, i.e., why you’d want to add ACF fields to the menu items? Is this to create mega menus, for example?
]]>Hi there,
The plugin seems to be causing a fatal error when the latest ACF Pro (5.6.0) is active:
2017/07/25 08:09:41 [error] 5901#5901: *54807 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot declare class acf_location_nav_menu, because the name is already in use in /home/forge/domain.co.uk/default/public/content/plugins/location-nav-menu-for-acf/acf_location_nav_menu.php on line 0" while reading response header from upstream, client: 86.186.80.127, server: domain.co.uk, request: "GET /wp/wp-admin/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "domain.co.uk"
Disabling the plugin fixes the site. Using ACF Pro 5.5.14 also works.
Many thanks!
Darren
]]>Hello!
Installed this plugin, I can create a new field in ACF but there is no option to add it to create navigation menu. There is nothing to select in wp menu manager, no ACF field ?
]]>After sorting menu-items WYSIWYG fields are no longer editable. The following patch should fix the issue:
function acfUpdateMenuLayout() {
jQuery('#menu-to-edit')
.on('sortstart', function(event, ui) {
acf.do_action('sortstart', ui.item, ui.placeholder);
})
.on('sortstop', function(event, ui) {
acf.do_action('sortstop', ui.item, ui.placeholder);
})
;
]]>
The select field is not updating correctly. I’ve used the same act field on a custom post and it works fine. But a menu item, it always saves the first option, regardless of which option is selected.
]]>Hi,
I define some fields as required on the field group. However, when I add an item to the menu and leave some required field blank, I am able to save the menu. No warnings or error messages given.
]]>Hi,
I have came across to a bug while creating custom nav bars with this plugin. I have defined three different field groups for level1, level2, and level3 items. All field groups has some fields in common. I am able to enter data while adding a new item to the menu however when I try updating any existing item, it doesn’t save the new values.
]]>Hi,
Great help, thanks.
Please add a filter to override includes path so I can include plugin in theme folder instead of need to installing it as a plugin.
If there is a github repo I would be willing to contribute.
BR
V
The previous thread was not satisfactory and didn’t help me at all.
Here’s my header.php Walker, which is pretty standard:
<?php
if (has_nav_menu('primary_navigation')) :
wp_nav_menu([
'theme_location' => 'primary_navigation',
'menu_class' => 'nav navbar-nav'
]);
endif;
?>
But when I implement emangham‘s solution I not only get multiple property errors, it also fails to display the data from the back-end.
This doesn’t seem like a very reliable solution/plugin.
Can someone show me how to implement/modify my walker to display these Nav Fields data on the front-end? The documentation is not very clear. I can create fields, enter data, save them just fine.. but then what? I just cannot get this data to appear on the front-end at all.
]]>Hello,
I don’t fully understand how to display the data on the front-end, for example in a menu like so:
<?php wp_nav_menu(array(
'theme_location' => 'header-navigation',
'items_wrap' => '<ul class="nav__menu">%3$s</ul>',
'depth' => 3,
'container' => false
)); ?>
How would I display a list like so:
<ul>
<li><a href="$MENU-ITEM-URL"><span>$ACF-DATA-HERE</span>$MENU-ITEM-LABEL</a></li>
</ul>
Sorry if this is a silly question! Look forward to making the most out of the plugin.
Thanks,
Elliott
Hello,
I would like to know if this plugin is supposed to work with a WordPress Network install?
Thank you in advance for your reply!
]]>First, thank you for an extremely useful plugin. I did find one bug with it though. In the menu, the ACF fields are causing things to float incorrectly. This is fixed in:
/inc/edit_custom_walker.php:148 – Add “wp-clearfix” class
Let me know when you can update.
Thanks!
]]>Hi,
I looks like you are not able to add content to a field and remove it later, even though the field is not required. E.g.
1) Add an image to a image field
2) Save
3) Remove the image
4) Save
The original image is still there.
Same issues with a text field:
1) Fill out a text field with a string
2) Save
3) Remove the string so the text field is empty
4) Save
The original string is still there.
I’ve stepped through the code and the culprit seems to be here:
https://github.com/DenisYakimchuk/ACF-Location-Nav-Menu/blob/master/inc/fields_actions.php#L54
If a field is updated with an empty value, update is skipped.
I think the solution is simply to drop the $v != ” check.
Regards,
Anton
]]>