Placing generated list into drop-down on custom menu
buuut the problem is that the list of elements is outside the ul of the menu in itself. I think part of the problem might be that wp_list_categories() is in echo-mode by default so $latestpost is always empty. Please try it with these parameters instead: // Get the categories $latestpost = wp_list_categories( array( ‘orderby’ => … Read more