WordPress Custom post query sorting does not work

Your problem is in using as orderby value meta_value and thus the order is correct – from computer point of view. To get currect order from human point of view, try to use meta_value_num instead. You can read more in here: https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

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