Support » Fixing WordPress » WP_Nav_Menu bloated query call

  • gabrielstuff


    Hi there,

    I’ve somehow an issue with this great WP_Nav_Menu function. It looks like it works but, it consume lot of queries.
    From my various test here is what i’ve noticed, each time you add a page/post type menu to one menu it takes 4 queries to retrieve the element on the front. This number increase each time you add an element to your menu. Using custom link, only make one query.

    But why each element represent one query ? And why couldn’t we do a bulk load of the whole menu and its children instead of loading each page of the menu one by one.

    Thank you !

  • The topic ‘WP_Nav_Menu bloated query call’ is closed to new replies.