WP_Nav_Menu bloated query call (1 post)

  1. gabrielstuff
    Posted 3 years ago #

    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 !

Topic Closed

This topic has been closed to new replies.

About this Topic