wp-nav menu with custom walker , how to remove a tag if it has any submenu

wp-nav menu with custom walker , how to remove a tag if it has any submenu

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)