This question already has an answer here:
i have seen
$wp_the_query in many plugins and themes. for me these two are just same thing with no difference. i am not looking to either use or get the values from $GLOBALS.
what is the actual difference between these two objects and when to use them?
What is the proper action /filter hook for getting and reading values from