Skip to main content
adding code format in two places to improve readability
Source Link
mrwweb
  • 10.3k
  • 5
  • 40
  • 75

If you change your ifif statement to use $query->is_main_query() like the example on the is_main_query() codex page, does that resolve the issue?

The nav menus are created by a query, so usually this problem stems from the pre_get_postspre_get_posts interfering with the menus query. Hence, I wonder whether that check isn't working.

If you change your if statement to use $query->is_main_query() like the example on the is_main_query() codex page, does that resolve the issue?

The nav menus are created by a query, so usually this problem stems from the pre_get_posts interfering with the menus query. Hence, I wonder whether that check isn't working.

If you change your if statement to use $query->is_main_query() like the example on the is_main_query() codex page, does that resolve the issue?

The nav menus are created by a query, so usually this problem stems from the pre_get_posts interfering with the menus query. Hence, I wonder whether that check isn't working.

Source Link
mrwweb
  • 10.3k
  • 5
  • 40
  • 75

If you change your if statement to use $query->is_main_query() like the example on the is_main_query() codex page, does that resolve the issue?

The nav menus are created by a query, so usually this problem stems from the pre_get_posts interfering with the menus query. Hence, I wonder whether that check isn't working.