As crazy as this might sound, the problem in my application was happening because I had a FILE called menu.php where I had a class to create Wordpress menus.
Literally, simply changing the name of the FILE from menu.php to nav-menu.php, fixed the issue. I replicated the issue 3 times because I could not believe the name of the FILE could be the problem.
Just in case somebody would like to now what was inside that file, here it is:
class OwNavMenu extends OwCpnt
{
function __construct( $location, $args ) {
$show = $args['show'];
$span = $args['span'];
if ( $show ) {
$this->menu( $location, $span );
}
}
function menu( $location, $span ) {
if ( $location ) {
echo '<div id="ow-' . $location . '" class="ow-nav ow-' . $location . '">';
wp_nav_menu(
array(
'theme_location' => $location,
'link_before' => ( $span ) ? '<span>' : '',
'link_after' => ( $span ) ? '</span>' : ''
)
);
echo '</div>';
}
}
}