Return Page/Post ID’s of Child WP_Nav_Menu items

Hook int 'wp_nav_menu_objects'. You get a list (an array) of all found menu items as an array. Each item is an object, and each one has a property named ID. That’s the ID of the original object if it was a post object.

In your filter callback just iterate over these items, collect the IDs and use them later in your custom query.

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