I have a wordpress template part called “grid-loop.php” that has a query that shows a grid of items. Initially, in this template part, I pass $args to it. It works fine. I’m trying to set it up differently now. Let me explain.
I now have a page template (page-news.php) that contains the args:
So basically the $args is in a separate document from the actual WP_Query. It doesn’t work. Maybe it can’t work this way or I’m doing something wrong? When I put the arguments with the query in the same document, it works fine. Suggestions?