… uses array_merge? Great, but why is this relevant? Consider you are creating a short code wrapper for a function where some of the arguments that are passed to the function must be specific values and the others are meant to be exposed to the user. As an example, let’s look at a shortcode using … ∞
Expand the wp_nav_menu() function by adding menu items to the output with the add_filter() function.
This article will show how to implement the wp_nav_menu() function using the wp_list_pages() function as a fallback.
A few options to address and with possibly a minor edit to the theme, you can upgrade wp_list_pages() easily to wp_nav_menu() in your theme.
Examples of adding a home page link to a WordPress theme with code that can be easily copied and pasted.