Problem with get_page_by_path() using with WP_Query
It doesn’t make any sense to try and pass a query result to get_page_by_path(). The point of WP_Query is to query for a selection of posts based on given criteria, while get_page_by_path() is for retrieving a single specific post based on its path. There’s no reason you’d need to use them together. If you want … Read more