I have made a menu item with this code. The menu item shows up but the shortcode output is not there. Is there something I can add or a different method that will do this. I hav
Enable description on the menu page, paste to the description textarea of the link your shortcode, in functions.php add next code:
add_filter('walker_nav_menu_start_el', function($item_output, $item) {
if (!is_object($item) || !isset($item->object)) {
return $item_output;
}
if ($item->ID === 829) {
$item_output = do_shortcode($item->description);
}
return $item_output;
}, 20, 2);