How to use get_pages( ) correctly with ‘child_of’ to replace page with child page

Okay, I’ve solved this. I just needed to replace $query->query_vars['page_id'] with get_queried_object_id() and everything works!

However, I just read Pieter’s response and it appears that indeed, according to the codex, it’s not supposed to work. Weird though, because it IS working. I guess we’ll see if anything breaks…

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