The WP Query class can be used to make almost any imaginable query to the WP database. It’s amazing.
But it’s also used when WordPress is loaded, to run the main query for the current page request.
A common practice is to use
But it’s unclear when to use one or the other, or if they must be used at all. And I don’t want to use them just in case but only when they are really needed.
So I would like to know what is the correct way to use the power of
WP Query without breaking the main query.