NO BUG: Page Query Loop in header outputs posts on post archive

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

I have a header with a menu that is created by query-looping the pages + 2 extra manually added dropdowns that queryloop taxonomies.

The header menu is rendered correctly on all the pages, but on a taxonomy page, where archive template is aplied, the pages do not show. Just manually added items do.

In the editor, when I edit the archive template, the header shows list of CPT titles instead of pages.

What could be the reason of this? Bug or I am doing something wrong?

Hi,
Thanks so much for your report!

Most likely merging queries. Have you already tried to enable the “disable query merge” toggle?

Best regards,
timmse

Thank you. Fixed. I didn’t understand this setting should be applied here. Is it because I have nested loops? Never used it before in such cases.

It can happen for various reasons that different loops/queries get in each other’s way and influence each other. Don’t worry… and remember to activate the toggle if they behave “strangely”. In most cases, this will solve the problem.

1 Like