I’m using a custom function to reorder posts on my category pages based on a custom field. However, this causes elements – both hooks and headers – to not show up on these pages. The green banner on the site is a header element set to be displayed on the entire site but does not show up on my category pages. I realize this isn’t exactly a GP issue but I’m wondering if there is any way for me to continue using the function and display elements on these pages:
At the time, I had an ad dynamically inserted inside the styled div. It shows up perfectly on all pages except the pages affected by my function. I’m not a wordpress developer but from what I’ve read, it seems to be related to pre_get_posts modifying the page.
The stack exchange question below was the closest thing I could find that best describes the problem from my basic understanding, but the solution is way over my head.