Title: Function code crashes theme
Last modified: August 21, 2016

---

# Function code crashes theme

 *  Resolved [Jason Paul](https://wordpress.org/support/users/jasontrasaterracom/)
 * (@jasontrasaterracom)
 * [13 years ago](https://wordpress.org/support/topic/function-code-crashes-theme/)
 * Is it possible that you’ve got an error in your function code?
    Should: `add_action('
   acf/register_fields', 'my_register_fields');`
 * be something like:
    `add_action('acf_register_fields', 'my_register_fields');`
 * (this is crashing my theme…but I’d really like to use this)
 * [http://wordpress.org/extend/plugins/advanced-custom-fields-nav-menu-field/](http://wordpress.org/extend/plugins/advanced-custom-fields-nav-menu-field/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Jason Paul](https://wordpress.org/support/users/jasontrasaterracom/)
 * (@jasontrasaterracom)
 * [13 years ago](https://wordpress.org/support/topic/function-code-crashes-theme/#post-3742546)
 * Just wanted to follow up and note that my fix IS THE fix. The beauty of this 
   plugin and that function is that all you need to do once activated is drop in
   the most basic ACF display code into your template file for this to work:
    `<?
   php the_field('sub_nav'); ?>`
 *  Plugin Author [Faison](https://wordpress.org/support/users/faison/)
 * (@faison)
 * [13 years ago](https://wordpress.org/support/topic/function-code-crashes-theme/#post-3742685)
 * Hi Jason,
 * I’m glad you were able to figure it out 😀
 * Thanks,
    Faison

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function code crashes theme’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-custom-fields-nav-menu-field_fdfdfd.
   svg)
 * [Advanced Custom Fields: Nav Menu Field](https://wordpress.org/plugins/advanced-custom-fields-nav-menu-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields-nav-menu-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Faison](https://wordpress.org/support/users/faison/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/function-code-crashes-theme/#post-3742685)
 * Status: resolved