Declaring in variables [closed]
You need to call global $variable; before you can use the variable. Try the code below instead for that line. // setup your global scope here global $icon_var; // set the new value in global scope $icon_var = get_post_meta($menu_item->ID, ‘_menu_item_custom’, true); // then use the variable $menu_list .= “\t\t\t\t\t<li><a href=\”$url\”>$icon_var<span>$title</span></a></li>\n”; DYNAMIC GLOBAL VARIABLE NAME If … Read more