Add custom link on the fly to nav menu

There is a really good example on this page if you want to have a look and see if it helps – https://isabelcastillo.com/dynamically-sub-menu-item-wp_nav_menu

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