How to create editable menu with parent and child in wordpress?

WordPress has some functions to help work with lists of objects. These are especially helpful when working with the nav menu objects or the query object.

wp_filter_object_list() takes an array of objects and filters them by a given set of criteria. You get a result that only contains objects that match your criteria.

Once you get a list of the menu items you’d like to loop through, you can check conditions to output different things. For example, what’s the depth? What is the parent post id? etc.
After that, grab the relevant information from the associated post id.

I hope that helps.

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