How to register a menu based on a ACF condition
Ok, so the problem was that I was adding the variable outside the function. After some cleanup, code looks like this and it works! function roots_setup() { // Variables $header_type = get_field(‘header_type’,’options’); if (($header_type)==’brand-centered’) { register_nav_menus(array( ‘brand_centered_left’ => __(‘Brand Centered Navigation (Left)’, ‘roots’) )); register_nav_menus(array( ‘brand_centered_right’ => __(‘Brand Centered Navigation (Right)’, ‘roots’) )); } else … Read more